QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#358527#4206. Event HoppingDec0Dedd#10 59ms7524kbC++141.0kb2024-03-19 20:33:242024-07-04 03:30:06

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 0
Runtime Error

input:

100000 100000
825913690 825916363
333322014 333324481
302015784 302018251
841002775 841005448
810249910 810252583
803554045 803556718
379590599 379593066
413477311 413479778
304105333 304107800
856802878 856805551
355907399 355909866
365590374 365592841
813775597 813778270
816058339 816061012
383873...

output:


result:


Subtask #2:

score: 10
Accepted

Test #13:

score: 10
Accepted
time: 14ms
memory: 5464kb

input:

1000 100
67878298 387720407
270457472 922959000
286470357 618323410
260791474 282940414
301337446 553875076
478221503 724555102
380447228 437131400
191801427 465825895
366088873 431222136
49483883 103442781
699926238 720636919
253150351 291688158
411085513 727726933
444078045 496386017
420626857 822...

output:

1
2
2
impossible
1
2
1
2
impossible
2
2
impossible
impossible
impossible
1
impossible
impossible
impossible
impossible
impossible
2
impossible
2
impossible
1
1
impossible
1
1
1
1
impossible
2
impossible
2
impossible
1
1
impossible
impossible
impossible
1
2
impossible
impossible
1
2
impossible
imposs...

result:

ok 100 lines

Test #14:

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

input:

1000 100
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 1000000000
1 100...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

result:

ok 100 lines

Test #15:

score: 0
Accepted
time: 4ms
memory: 3864kb

input:

1000 100
219652137 219887840
411750082 411985785
295784206 296019909
323361457 323597160
263257192 263492895
228373148 228608851
311812010 312047713
189246450 189482153
197024649 197260352
214230968 214466671
209045502 209281205
282113432 282349135
277870778 278106481
394308060 394543763
318175991 3...

output:

999
998
998
997
997
997
996
996
996
996
995
995
995
995
995
994
994
994
994
994
994
993
993
993
993
993
993
993
992
992
992
992
992
992
992
992
991
991
991
991
991
991
991
991
991
990
990
990
990
990
990
990
990
990
990
989
989
989
989
989
989
989
989
989
989
989
988
988
988
988
988
988
988
988
988
...

result:

ok 100 lines

Test #16:

score: 0
Accepted
time: 14ms
memory: 6524kb

input:

1000 100
146460236 650840147
213248988 712234443
271625877 765585418
268035474 762542588
155957999 659365570
108300122 614352264
161735587 665204546
244432982 734605513
84404294 596250403
472975048 964576612
128756912 628710941
130473656 631636782
324178293 813816145
197620586 692901130
353485130 84...

output:

impossible
1
impossible
impossible
1
impossible
impossible
impossible
1
1
impossible
1
impossible
1
impossible
impossible
1
1
impossible
impossible
1
impossible
1
1
1
impossible
impossible
impossible
impossible
1
1
1
impossible
impossible
impossible
impossible
1
1
impossible
impossible
1
1
1
1
impos...

result:

ok 100 lines

Test #17:

score: 0
Accepted
time: 4ms
memory: 3832kb

input:

1000 100
734527256 734722851
176171640 176781511
73713312 74323183
347545391 348155262
741959866 742155461
727094646 727290241
304244550 304854421
256064741 256674612
692278736 692474331
678391491 678587086
757020681 757216276
324370293 324980164
327419648 328029519
720248821 720444416
253015386 253...

output:

1
impossible
1
impossible
246
334
impossible
impossible
impossible
477
impossible
379
impossible
impossible
393
196
impossible
271
122
impossible
impossible
impossible
impossible
impossible
207
impossible
impossible
190
impossible
impossible
impossible
impossible
impossible
impossible
impossible
imp...

result:

ok 100 lines

Test #18:

score: 0
Accepted
time: 3ms
memory: 3536kb

input:

1000 100
549 550
689 690
273 274
760 761
414 415
639 640
420 421
592 593
308 309
55 56
952 953
181 182
2 3
476 477
262 263
329 330
261 262
875 876
78 79
711 712
771 772
871 872
328 329
585 586
185 186
471 472
191 192
611 612
758 759
538 539
24 25
518 519
903 904
748 749
547 548
435 436
81 82
459 460...

output:

impossible
impossible
impossible
554
impossible
impossible
impossible
661
712
333
impossible
impossible
impossible
impossible
impossible
impossible
329
impossible
101
416
impossible
268
impossible
676
impossible
131
impossible
impossible
impossible
337
impossible
417
impossible
231
impossible
146
im...

result:

ok 100 lines

Test #19:

score: 0
Accepted
time: 7ms
memory: 4432kb

input:

1000 100
41916637 42739142
57513660 58326077
21867551 172652993
148410501 243619298
80759769 81439087
1165860 77201426
122988614 155997027
100181236 100563028
185001902 185375949
176810589 177691863
141890410 142849915
92309958 240703409
40538462 236387490
22164234 22167602
144201862 144991292
19678...

output:

2
1
2
impossible
impossible
impossible
impossible
1
1
3
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
1
2
impossible
impossible
impossible
impossible
1
impossible
impossible
2
impossible
2
impossible
1
impossible
impossible
impossible
i...

result:

ok 100 lines

Test #20:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

5 2
1 3
2 4
4 7
7 9
3 7
1 4
3 2

output:

2
impossible

result:

ok 2 lines

Subtask #3:

score: 0
Runtime Error

Dependency #2:

100%
Accepted

Test #21:

score: 0
Runtime Error

input:

5000 100000
444771902 444813193
517939554 517980845
420657958 420699249
565300331 565341622
489902965 489944256
550146534 550187825
621579964 621621255
541970916 542012207
504932889 504974180
509970391 510011682
548990386 549031677
531606875 531648166
611628833 611670124
424167693 424208984
43593562...

output:


result:


Subtask #4:

score: 0
Runtime Error

Dependency #2:

100%
Accepted

Test #28:

score: 0
Runtime Error

input:

100000 100
339859414 339860443
735166371 735174392
348212836 348213865
888215072 888223093
792396206 792404227
329405875 329405966
323863609 323864638
349411621 349412650
805520775 805526215
780236547 780238983
878461536 878469557
329490782 329490797
689599070 689607091
333606181 333607210
778431645...

output:


result:


Subtask #5:

score: 0
Runtime Error

Test #35:

score: 0
Runtime Error

input:

100000 100000
903318459 905410836
903528407 905653109
925180437 927048927
473524826 475597377
362562616 364539688
644980844 646918450
242583398 244653279
506338025 508361063
481496693 483530832
970053326 972147109
794840350 796900045
130664210 132709680
634100524 636336820
844429264 846504591
652483...

output:


result:


Subtask #6:

score: 0
Skipped

Dependency #1:

0%