QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#860560#9975. Hitoshizukuucup-team2819#AC ✓84ms29580kbC++142.1kb2025-01-18 14:00:252025-01-18 14:01:27

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 19168kb

input:

2
2
1 2
2 2
2 3
3 5
4 4
4 5
1
1 1
1 1000000000
1000000000 1000000000

output:

Yes
4 5 6
1 2 3
No

result:

ok >_< (2 test cases)

Test #2:

score: 0
Accepted
time: 38ms
memory: 18952kb

input:

100000
1
164154503 167959139
178382610 336470888
12298535 642802746
1
165064830 773386884
353585658 396628655
792066242 971207868
1
1607946 2087506
21674839 46761498
9518201 16843338
1
262361007 691952768
190585553 787375312
637191526 693319712
1
41970708 45277106
197619816 762263554
308360206 40724...

output:

No
No
No
Yes
2 1 3
No
Yes
1 2 3
No
No
No
No
No
Yes
1 3 2
Yes
1 2 3
No
No
No
No
Yes
3 1 2
No
Yes
3 1 2
No
No
Yes
3 1 2
No
No
Yes
1 3 2
No
No
No
No
No
No
No
Yes
2 1 3
No
No
Yes
1 2 3
No
No
No
No
No
No
No
No
No
No
No
No
Yes
2 1 3
No
No
Yes
2 1 3
Yes
3 2 1
No
No
Yes
2 1 3
No
No
No
Yes
1 3 2
Yes
2 1 3
No...

result:

ok >_< (100000 test cases)

Test #3:

score: 0
Accepted
time: 37ms
memory: 19476kb

input:

50000
2
36364670 641009859
15071436 75475634
20446080 476927808
357784519 503158867
206641725 322595515
268011721 645468307
2
247717926 939887597
808609669 973764525
496738491 710156469
463547010 860350786
757388873 784695957
29903136 208427221
2
26681139 67590963
458238185 475357775
80127817 135993...

output:

No
No
No
No
No
No
No
No
No
No
No
No
Yes
2 6 4
3 5 1
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
3 5 4
2 1 6
No
No
No
No
No
No
No
Yes
2 4 1
5 6 3
No
No
No
No
No
Yes
6 3 5
1 2 4
Yes
1 4 5
6 3 2
No
No
No
Yes
4 1 2
3 6 5
No
No
Yes
4 1 2
3 6 5
Yes
3 1 4
6 5 2
Yes
3 6 4
2 1 5
No
Yes
1 5 2
4 6 3
No...

result:

ok >_< (50000 test cases)

Test #4:

score: 0
Accepted
time: 36ms
memory: 19880kb

input:

33333
3
405068225 524125987
162463453 374288891
493199993 751244358
111234434 232930851
71448581 543529670
158749276 319728747
238956600 582720391
320275833 490702144
111160223 138628383
3
23006185 733781508
636477523 931759705
585852932 723534730
388969099 794937524
153929016 188451996
7487968 1448...

output:

No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Yes
8 5 4
3 2 6
1 7 9
No
No
Yes
5 4 9
3 7 2
8 6 1
No
No
No
Yes
2 6 8
3 7 1
4 9 5
Yes
8 6 1
9 2 4
7 5 3
No
Yes
8 7 1
9 6 3
4 5 2
Yes
3 4 7
9 5 2
1 8 6
No
No
No
Yes
4 7 6
2 1 9
5 3 8
No
No
No
Yes
7 8 5
4 3 2
9 1 6
No
Yes
2 3 1
7 8 9
4 6 5
No
...

result:

ok >_< (33333 test cases)

Test #5:

score: 0
Accepted
time: 35ms
memory: 18504kb

input:

25000
4
387784488 702209411
329025563 673102149
394641352 730593611
244761087 812959730
198875143 469496529
425799311 699021890
715498963 815487777
765027712 857896659
160339866 421876106
477145912 902179526
264824816 783856158
26239891 238642240
4
588094643 962475573
90297216 196513513
234289482 33...

output:

Yes
10 7 8
1 3 6
4 11 2
12 9 5
No
No
No
No
No
No
No
Yes
11 5 4
12 10 7
9 8 1
3 6 2
No
No
Yes
2 1 8
10 12 5
4 7 9
6 11 3
Yes
5 11 2
8 12 3
6 7 1
9 10 4
No
No
No
Yes
8 1 4
3 7 10
6 5 11
9 12 2
No
No
No
No
No
Yes
8 2 12
11 3 6
4 7 1
9 10 5
No
Yes
11 5 8
2 10 4
7 1 12
9 6 3
No
No
No
Yes
10 8 6
5 11 7
1 ...

result:

ok >_< (25000 test cases)

Test #6:

score: 0
Accepted
time: 38ms
memory: 19800kb

input:

20000
5
255424772 585325539
298257969 412106895
366545795 564718673
426199147 837699009
609084202 690430685
367932561 373282330
488491851 753287868
18693151 79866982
629564684 850348020
7594098 480642952
376090136 930919906
592321264 903492853
345689007 984789430
895853014 909607734
122083425 211655...

output:

No
Yes
6 10 12
1 2 14
5 9 4
13 11 8
7 3 15
Yes
9 14 13
8 15 2
11 7 5
10 6 1
3 4 12
No
Yes
4 5 10
13 14 12
8 6 7
2 9 1
3 15 11
No
No
No
No
Yes
8 3 12
10 15 13
11 4 9
7 1 14
6 5 2
No
No
Yes
2 9 10
13 5 14
1 12 7
3 4 6
11 15 8
Yes
4 8 7
12 6 2
15 9 3
13 1 10
5 14 11
Yes
4 3 1
15 10 13
8 11 2
6 7 9
14 1...

result:

ok >_< (20000 test cases)

Test #7:

score: 0
Accepted
time: 38ms
memory: 20128kb

input:

16666
6
26845100 58376259
4489038 5887448
307580079 544067926
473165155 712695184
842055718 911364840
851679243 902318577
17646538 250896470
562282480 742028793
60193924 133595743
573222241 649040970
189379234 223207847
301595726 418600362
105036855 417168695
446368438 622701955
89667978 235369723
2...

output:

No
No
Yes
13 17 1
18 12 8
6 4 16
2 5 15
3 11 9
7 10 14
No
Yes
8 13 3
2 6 17
16 18 14
7 11 5
9 4 1
12 10 15
Yes
7 13 12
10 9 16
18 11 1
4 2 15
6 8 3
5 14 17
Yes
5 11 17
6 3 16
2 4 18
10 8 12
13 9 7
15 14 1
No
Yes
10 9 13
15 2 14
1 12 17
16 7 18
4 8 6
5 3 11
Yes
15 10 4
2 11 18
6 5 17
1 13 12
14 7 16
...

result:

ok >_< (16666 test cases)

Test #8:

score: 0
Accepted
time: 41ms
memory: 18128kb

input:

14285
7
498283426 941492387
435838088 449924898
60069608 378192988
2943111 147499872
449114197 837331700
157821356 576579017
175187302 188696560
119961285 669031820
613970072 826908873
631375408 817438988
79062948 370271596
137867063 638740575
161249104 439482552
40882880 335796176
97823227 25908403...

output:

Yes
17 9 10
18 5 1
6 13 2
20 12 7
11 15 8
14 19 3
4 21 16
No
Yes
9 4 2
7 14 3
15 19 10
11 18 6
12 16 8
13 21 20
5 1 17
Yes
8 20 14
9 19 21
4 12 15
6 7 10
17 1 3
16 13 2
18 11 5
Yes
11 13 1
8 15 7
2 4 5
3 9 12
17 14 6
18 16 20
21 10 19
No
No
No
No
No
No
No
Yes
12 7 8
14 13 2
21 4 17
9 19 5
6 15 18
16...

result:

ok >_< (14285 test cases)

Test #9:

score: 0
Accepted
time: 39ms
memory: 18492kb

input:

12500
8
109970553 824608515
38308643 43705451
617662368 652509537
56888590 317463343
17277529 58265855
96899941 250839457
10202459 126496650
221863474 331193631
98584951 255380788
66986639 690869710
118913405 222368048
3832128 8623893
411234159 461796409
101768229 194114590
63466173 137574156
159144...

output:

No
No
Yes
9 13 18
22 17 10
4 14 21
8 7 20
11 23 15
16 3 24
12 5 1
2 19 6
No
No
No
Yes
23 22 8
24 11 10
19 21 16
20 7 15
17 3 2
14 12 13
1 5 6
9 4 18
Yes
12 4 21
17 14 18
7 13 24
15 16 19
9 11 8
1 6 20
2 22 5
10 23 3
No
Yes
16 24 17
3 2 15
4 22 13
9 21 20
23 5 8
14 11 1
18 12 10
19 7 6
Yes
12 16 21
3...

result:

ok >_< (12500 test cases)

Test #10:

score: 0
Accepted
time: 37ms
memory: 18260kb

input:

11111
9
1107549 2691939
298974391 782710197
175975837 631858791
80573957 752268030
44807884 279200011
318005100 630132600
130445116 769329445
230959195 258196658
67434329 538628510
126840838 859267729
426717264 514655989
280881449 523731402
150265596 189142970
138881978 907208811
12171267 161288468
...

output:

No
Yes
2 18 11
9 13 6
16 22 3
20 17 25
4 27 24
14 21 23
5 10 7
12 15 8
26 19 1
Yes
24 9 5
1 12 4
7 20 27
8 22 13
26 11 14
21 25 19
16 17 6
10 23 15
3 2 18
No
Yes
26 20 3
25 7 19
10 11 9
4 21 16
18 12 23
1 14 2
13 8 24
22 6 5
27 17 15
Yes
23 10 9
11 12 25
1 2 26
18 14 24
20 19 17
7 8 5
13 15 4
22 21 ...

result:

ok >_< (11111 test cases)

Test #11:

score: 0
Accepted
time: 41ms
memory: 18244kb

input:

10000
10
419583132 802030518
503473132 640274071
29114694 71550121
266502879 799843967
519878600 796619138
109163155 223219513
173801057 312183499
295274161 673542337
569813861 879397647
566104761 631413076
40006012 579868000
45494915 126195703
211345072 535526356
507966667 653535984
868289731 87922...

output:

No
No
No
No
No
No
Yes
18 10 20
25 14 11
12 26 16
3 17 22
23 13 5
19 27 4
24 2 8
6 29 30
21 15 28
1 9 7
No
No
No
No
No
No
No
Yes
5 17 22
14 7 6
2 16 1
18 20 9
11 24 27
29 15 23
30 13 19
25 28 12
10 4 8
21 3 26
No
Yes
5 2 18
23 16 24
11 20 6
7 28 21
25 4 22
1 13 27
15 3 8
17 26 30
12 29 10
14 9 19
Yes...

result:

ok >_< (10000 test cases)

Test #12:

score: 0
Accepted
time: 42ms
memory: 18200kb

input:

5000
20
248930144 452405440
28850950 509061481
11675144 16115810
46552920 66743034
250304676 677780684
13100349 208050516
401412088 954478790
27263447 387546138
341164513 641889899
343680066 717802881
119096072 661699500
675285710 759454419
90875780 255743179
294553111 694729965
146519548 862937826
...

output:

No
Yes
31 46 23
55 27 51
40 18 15
20 4 56
59 35 58
45 7 37
9 24 2
34 48 6
16 21 19
32 39 50
57 22 17
14 41 10
1 12 36
3 28 13
30 26 29
11 60 47
54 52 38
5 33 49
43 44 8
25 53 42
Yes
32 24 30
11 49 43
58 31 60
42 16 28
41 51 17
53 6 20
45 15 18
33 54 46
55 23 8
59 50 48
35 1 44
5 29 22
56 34 38
52 13...

result:

ok >_< (5000 test cases)

Test #13:

score: 0
Accepted
time: 43ms
memory: 20028kb

input:

2500
40
30078839 43603670
585409830 661220621
47019446 315312595
195376102 450798063
12047273 30038366
6365574 32488330
44528676 63719100
45395244 370843342
42359492 166874404
189032198 330773980
229782995 560521283
338711259 466163339
486437793 995663034
47493303 362533606
574415501 975584927
63051...

output:

Yes
13 15 101
111 98 94
59 119 83
87 76 82
2 72 99
97 28 54
39 44 23
26 40 105
112 118 25
89 56 113
62 47 81
33 79 48
46 43 93
90 12 38
50 84 17
85 20 24
110 37 106
58 86 32
104 19 67
115 53 117
52 77 11
78 109 34
4 120 27
71 10 91
70 57 41
69 95 61
55 88 51
49 29 63
35 22 36
64 108 96
16 114 74
14 ...

result:

ok >_< (2500 test cases)

Test #14:

score: 0
Accepted
time: 44ms
memory: 18588kb

input:

2000
50
167005 134170081
119263013 235040736
359376356 405102476
368254760 567954026
142560899 351391400
52465572 872095141
5895182 116079799
503946453 935104039
624910603 779623552
407602577 857355273
104834774 642352783
377070248 394389351
7487217 10847154
78697148 403727586
19118138 104520573
302...

output:

No
Yes
128 93 64
104 41 14
99 61 73
28 120 131
65 29 107
141 35 13
125 50 122
16 30 57
7 97 36
22 126 60
55 87 140
132 48 21
11 31 63
84 17 69
95 40 43
19 8 5
103 83 113
111 25 118
146 89 15
26 108 3
52 123 4
38 1 49
102 116 10
85 136 81
33 53 135
119 75 23
76 51 144
56 6 80
46 91 44
32 34 58
78 47 ...

result:

ok >_< (2000 test cases)

Test #15:

score: 0
Accepted
time: 48ms
memory: 20024kb

input:

200
500
240044454 570226789
326748706 906240738
59915230 229227123
25870484 122983289
308323481 491439677
331521117 542348836
79780138 236140577
37215732 400441450
491421004 505626478
41928148 79419397
196402648 681911017
108323645 778854244
168295325 331859787
204653768 764539434
3525633 67848640
2...

output:

Yes
724 131 1088
1297 1440 309
944 924 542
34 1319 1019
313 1490 20
782 1026 1362
639 194 223
1091 1075 177
939 556 1230
976 387 1498
861 602 77
244 347 998
462 1018 787
877 1104 344
158 312 61
261 100 680
275 900 993
516 28 1455
1479 1313 1293
211 746 553
759 1316 440
1393 297 463
825 711 1059
725 ...

result:

ok >_< (200 test cases)

Test #16:

score: 0
Accepted
time: 46ms
memory: 20476kb

input:

20
5000
239015031 756662829
107482861 164615679
141286392 176745065
711024070 930641599
203753862 992714840
535460189 890646201
120990575 828015603
80241903 245741385
71064502 937343509
255954224 804090603
241085164 265947390
573467935 767999938
9086606 20283091
44079769 135162900
195630455 72443138...

output:

Yes
12264 2082 7914
461 13428 13621
7229 10482 8470
5958 4971 8165
221 13898 14509
4979 13306 2214
4630 3888 14363
4226 12097 4503
10371 14366 4798
1716 11861 13022
2306 13758 2286
12701 4120 8755
2939 89 1936
3703 1078 4034
7695 2750 4918
5864 13636 6076
6315 12156 9965
14069 5502 14501
10850 11917...

result:

ok >_< (20 test cases)

Test #17:

score: 0
Accepted
time: 46ms
memory: 23624kb

input:

2
50000
134099372 138717692
88497176 203623137
28400878 531963161
491599270 508595246
656123949 690513632
506593350 840717696
75151479 190312317
138082662 708771391
441148125 893057843
452806396 741239078
42068396 78667991
585159549 926735558
695533088 854308946
676238139 709752322
416586658 6449615...

output:

No
No

result:

ok >_< (2 test cases)

Test #18:

score: 0
Accepted
time: 63ms
memory: 29580kb

input:

1
100000
168698075 217141764
51605261 710454586
17380477 789075415
570367 24849107
469495633 685675008
559954719 839804815
332883788 638763480
12087643 327755609
8406881 43827967
108436258 390187172
266381263 301370841
563550486 622696676
204362703 598237196
218501304 232099091
198720699 211987715
7...

output:

Yes
88776 43136 97113
217839 43411 103793
71221 8527 282066
240628 115488 290119
262106 170475 267061
71717 31532 48502
242893 261452 35124
7257 226371 82282
189373 162877 9538
14249 188957 235411
82459 65535 262542
201633 92455 61418
104039 115415 58661
295503 69462 234462
158252 229077 176746
2848...

result:

ok >_< (1 test case)

Test #19:

score: 0
Accepted
time: 49ms
memory: 19592kb

input:

333
300
499999940 500000540
499999880 500000480
499999882 500000482
500000108 500000110
499999706 500000306
500000286 500000288
499999742 500000342
500000500 500000502
499999773 500000373
500000184 500000186
500000090 500000092
500000010 500000012
499999640 500000240
499999830 500000430
499999945 50...

output:

Yes
391 329 769
760 638 303
127 327 83
586 773 458
716 584 16
173 120 828
65 157 452
164 189 693
134 378 896
737 692 881
56 358 214
110 758 118
330 621 224
573 268 489
604 619 699
551 886 85
632 305 236
271 250 474
191 641 708
48 242 545
763 194 531
755 612 704
24 37 225
212 390 300
364 8 269
28 812...

result:

ok >_< (333 test cases)

Test #20:

score: 0
Accepted
time: 52ms
memory: 20632kb

input:

20
5000
500004916 500004918
499994554 500004554
499994653 500004653
500008346 500008348
499990052 500000052
499998337 500008337
499991225 500001225
500008078 500008080
500001210 500001212
500008800 500008802
499992103 500002103
500007998 500008000
500006906 500006908
499994207 500004207
500009454 50...

output:

Yes
8483 8109 843
14720 10730 11137
5305 6445 11435
14768 10137 13424
8407 2926 9992
12126 1920 7740
14089 7776 9490
14434 2136 4846
11824 11107 14274
13711 8884 6414
4024 4278 4175
6295 6412 1851
8649 8010 1644
4732 604 2317
12611 3603 14716
10548 1777 5177
13495 2509 13274
2741 8197 5753
7309 840 ...

result:

ok >_< (20 test cases)

Test #21:

score: 0
Accepted
time: 59ms
memory: 19884kb

input:

10
10000
499997582 500017582
499994226 500014226
499999146 500019146
499986192 500006192
500006688 500006690
500005454 500005456
500012694 500012696
499994423 500014423
500018252 500018254
499984238 500004238
500019624 500019626
500002666 500002668
499981309 500001309
499984412 500004412
499989582 5...

output:

Yes
1040 14571 19658
5333 8414 26210
17034 4305 1123
3919 3660 15983
12496 9154 7729
14366 11146 18752
17784 25959 24324
6126 24018 15487
26218 29393 21634
11089 19344 9856
25171 11474 24292
23995 3640 3635
22389 992 399
15957 376 3715
5792 24658 4362
1182 9834 5590
19812 15491 15115
16273 24386 573...

result:

ok >_< (10 test cases)

Test #22:

score: 0
Accepted
time: 83ms
memory: 28616kb

input:

1
100000
500195974 500195976
499821737 500021737
500032078 500032080
499844833 500044833
500004644 500004646
499896575 500096575
499837203 500037203
500162180 500162182
499803443 500003443
499903390 500103390
499997619 500197619
499983152 500183152
499851444 500051444
500124540 500124542
500090666 5...

output:

Yes
169664 57772 264370
118569 219707 251923
279839 151393 24610
155446 298845 29852
130526 220574 198493
138571 66641 240210
92898 255977 22289
160386 180744 259581
231856 214331 15941
43509 101998 183092
200322 283502 58483
273989 244096 109270
130128 76076 137304
281667 1869 31979
255110 199908 2...

result:

ok >_< (1 test case)

Test #23:

score: 0
Accepted
time: 46ms
memory: 19860kb

input:

333
300
499999677 500000277
499999937 500000537
499999927 500000527
500000186 500000187
500000577 500000580
499999970 500000570
499999688 500000288
499999779 500000379
499999825 500000425
500000503 500000506
499999429 500000029
499999795 500000395
500000251 500000254
499999853 500000453
499999792 50...

output:

No
Yes
492 28 626
690 652 671
114 313 578
75 353 195
302 158 317
546 260 810
616 31 170
624 275 44
339 663 235
394 874 327
326 886 22
554 778 167
505 622 785
12 701 46
206 820 461
310 746 115
589 633 364
832 93 835
670 35 541
729 243 871
178 248 623
561 184 96
105 144 735
383 299 143
88 739 173
733 ...

result:

ok >_< (333 test cases)

Test #24:

score: 0
Accepted
time: 84ms
memory: 28928kb

input:

1
100000
500191010 500191012
499836328 500036328
499951243 500151243
499935598 500135598
499898653 500098653
499956171 500156171
500101528 500101529
499800616 500000616
500107541 500107543
500158180 500158181
499825597 500025597
500175739 500175742
500076543 500076545
499970418 500170418
500014716 5...

output:

Yes
242348 248627 97294
201431 237294 71248
133674 123904 174616
242096 149097 153991
240259 117725 16067
108573 220754 156081
14748 222813 277047
114319 90222 41475
177347 174862 75758
74397 298221 256252
292924 96550 215778
72648 67888 29986
245235 173982 154406
159782 67736 184686
49437 271735 23...

result:

ok >_< (1 test case)

Extra Test:

score: 0
Extra Test Passed