QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#533340#1139. StationsMinaRagy06#0 48ms4084kbC++201.1kb2024-08-25 20:33:532024-08-25 20:33:54

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 38ms
memory: 4084kb

input:

0
10
10 1000
4 5
9 0
2 6
5 2
8 3
1 4
8 1
6 0
3 7
3 1000
0 1
1 2
998 1000
166 178
393 452
389 179
622 429
892 866
872 18
899 227
835 637
587 769
504 386
369 577
65 441
523 17
803 221
878 321
637 892
696 473
16 146
840 322
495 986
353 275
330 585
831 402
719 810
704 830
780 940
53 901
894 911
394 482
...

output:

10
0
1
2
3
4
5
6
7
8
9
3
0
1
2
998
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91...

input:

1
59784
0 1 1
1
564 432 2
156
710
0 1 1
1
303 620 2
302
304
3 2 1
2
1 0 1
0
0 1 1
1
980 381 2
82
733
2 0 2
1
3
0 1 1
1
948 832 2
947
949
6 2 2
0
2
505 151 2
251
786
131 800 2
130
132
927 964 2
98
390
570 874 2
569
571
0 1 1
1
78 91 2
33
85
1 2 2
0
2
0 1 1
1
117 822 2
124
961
1 0 1
0
953 952 2
179
78...

output:

1
281
1
151
2
0
1
489
0
1
473
2
252
65
463
284
1
38
0
1
58
0
476
1
1
309
2
0
0
465
75
138
2
0
14
0
68
7
0
1
0
305
452
282
49
8
142
61
420
13
1
366
149
0
1
1
0
377
1
2
0
0
343
142
467
25
471
0
0
475
70
481
111
0
25
386
1
0
382
1
2
86
1
246
1
48
80
250
0
0
0
1
39
2
2
477
170
37
1
401
394
312
0
338
0
0...

result:

wrong answer Diff at 2-th number: read 281 but expected 710

Subtask #2:

score: 0
Wrong Answer

Test #11:

score: 0
Wrong Answer
time: 32ms
memory: 4084kb

input:

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

output:

996
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
10...

input:

1
50252
876 174 1
437
937 71 1
468
508 771 1
253
715 87 1
357
940 154 1
469
721 974 1
360
864 867 1
431
728 899 1
363
433 888 3
216
867
868
235 92 3
117
471
472
508 517 1
253
404 582 3
201
809
810
902 767 1
450
712 486 1
355
655 0 1
327
545 583 1
272
471 488 3
235
943
944
40 666 3
19
81
82
691 417 1...

output:

437
468
253
357
469
360
431
363
216
117
253
201
450
355
327
272
235
19
345
495
489
471
433
35
349
484
307
445
426
59
29
237
448
345
81
382
407
111
330
370
233
357
126
239
178
132
147
106
465
143
147
347
486
268
231
61
338
490
205
155
212
480
302
366
471
417
22
280
321
308
443
106
405
138
14
13
461
3...

result:

wrong answer Diff at 18-th number: read 19 but expected 82

Subtask #3:

score: 0
Wrong Answer

Test #17:

score: 0
Wrong Answer
time: 28ms
memory: 3824kb

input:

0
10
2 1000000
1 0
997 1000000
830 513
223 672
727 200
763 415
581 440
34 42
267 325
912 693
753 59
401 289
198 641
982 214
41 49
453 107
940 806
905 732
153 482
248 405
102 79
480 837
534 620
564 856
679 178
278 247
899 206
333 672
297 308
407 863
26 752
272 178
204 603
208 10
715 562
785 285
184 5...

output:

2
0
1
997
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
...

input:

1
59859
4 7 2
0
3
1 0 1
0
1 0 1
0
31 85 2
30
32
759 223 2
528
969
759 960 2
237
627
0 1 1
1
1 0 2
2
5
122 328 2
121
123
0 1 1
1
0 1 1
1
1 0 1
0
1 2 2
0
2
838 639 2
275
593
371 213 2
370
372
511 503 2
510
512
9 5 2
3
8
2 1 1
1
741 442 2
539
861
69 96 2
19
53
989 291 2
580
804
836 205 2
682
782
773 72...

output:

1
0
0
15
379
379
1
0
60
1
1
0
0
418
185
255
4
1
370
34
494
417
386
239
0
450
167
134
1
0
94
1
128
1
0
0
89
162
493
0
108
138
374
321
8
1
59
7
147
0
378
1
178
45
48
43
1
48
0
0
1
0
0
1
430
415
17
1
159
0
133
447
11
0
312
0
441
376
0
258
1
107
259
1
1
20
1
106
1
346
22
0
1
1
462
1
1
1
495
1
452
0
473
...

result:

wrong answer Diff at 1-th number: read 1 but expected 3

Subtask #4:

score: 0
Wrong Answer

Test #34:

score: 10
Accepted
time: 48ms
memory: 3796kb

input:

0
10
2 1000000000
0 1
2 1000000000
0 1
2 1000000000
1 0
2 1000000000
1 0
2 1000000000
0 1
2 1000000000
1 0
2 1000000000
1 0
2 1000000000
0 1
2 1000000000
0 1
2 1000000000
0 1

output:

2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1
2
0
1

input:

1
100000
1 0 1
0
0 1 1
1
0 1 1
1
1 0 1
0
0 1 1
1
1 0 1
0
1 0 1
0
1 0 1
0
1 0 1
0
1 0 1
0
0 1 1
1
1 0 1
0
0 1 1
1
1 0 1
0
0 1 1
1
0 1 1
1
0 1 1
1
1 0 1
0
1 0 1
0
0 1 1
1
1 0 1
0
0 1 1
1
0 1 1
1
1 0 1
0
1 0 1
0
0 1 1
1
0 1 1
1
1 0 1
0
0 1 1
1
0 1 1
1
1 0 1
0
1 0 1
0
1 0 1
0
1 0 1
0
1 0 1
0
0 1 1
1
1 0...

output:

0
1
1
0
1
0
0
0
0
0
1
0
1
0
1
1
1
0
0
1
0
1
1
0
0
1
1
0
1
1
0
0
0
0
0
1
0
1
0
0
0
1
1
0
1
1
1
1
0
0
1
1
0
0
0
1
1
0
1
1
0
1
1
0
0
0
1
0
1
1
1
1
1
1
0
1
0
1
1
1
0
0
0
0
1
0
0
1
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
0
0
1
0
1
0
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
1
0
0
1
1
1
0
1
0
1
0
1
1
1
1
0
0
0
0
1
0
0
1
0
0
0
...

result:

ok 

Test #35:

score: 0
Wrong Answer
time: 42ms
memory: 3880kb

input:

0
10
3 1000000000
2 1
2 0
3 1000000000
1 0
2 0
3 1000000000
2 0
0 1
3 1000000000
0 2
1 2
3 1000000000
1 2
1 0
3 1000000000
1 0
2 1
3 1000000000
0 2
1 2
3 1000000000
1 2
1 0
3 1000000000
0 2
1 0
3 1000000000
2 0
1 2

output:

3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2
3
0
1
2

input:

1
75069
1 2 2
0
2
0 2 2
1
2
0 2 1
1
0 2 1
1
2 0 1
0
0 1 1
2
1 2 1
2
2 0 2
0
1
2 1 1
0
1 2 2
0
2
1 2 2
0
2
1 0 1
2
1 2 2
0
2
1 2 2
0
2
2 0 1
1
0 2 1
1
1 0 2
0
2
0 2 2
1
2
0 2 1
2
1 2 1
2
2 1 2
0
1
2 1 2
0
1
1 0 1
0
1 2 1
2
0 2 1
2
1 0 1
2
0 2 1
2
2 0 1
0
1 0 1
2
1 0 2
0
2
2 1 2
0
1
0 2 2
1
2
2 0 2
0
...

output:

0
0
1
1
0
2
2
0
0
0
0
2
0
0
1
1
0
0
2
2
0
0
0
2
2
2
2
0
2
0
0
0
0
2
0
2
0
0
1
0
2
1
0
1
0
0
0
1
0
0
1
0
0
1
0
0
2
1
0
2
0
2
2
0
0
0
0
1
0
1
0
2
2
2
0
2
0
0
0
0
0
0
2
0
0
0
0
0
1
0
1
2
0
0
0
2
0
0
0
1
0
0
2
0
0
0
0
0
2
0
0
1
2
0
1
1
0
2
1
1
0
0
0
0
0
1
0
1
0
0
2
0
2
0
0
1
2
0
1
1
0
2
0
1
0
0
0
1
2
1
...

result:

wrong answer Diff at 1-th number: read 0 but expected 2

Subtask #5:

score: 0
Wrong Answer

Test #54:

score: 0
Wrong Answer
time: 36ms
memory: 3828kb

input:

0
10
3 1000000000
1 0
2 1
998 1000000000
928 443
90 795
55 379
957 417
759 300
960 136
309 858
833 370
228 827
876 955
619 365
15 108
243 388
54 925
141 894
272 634
0 989
600 346
380 277
350 113
326 613
975 946
660 98
34 538
220 864
9 585
185 860
458 424
509 14
22 275
109 872
153 233
76 834
972 736
...

output:

3
0
1
2
998
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
9...

input:

1
59797
2 3 2
1
3
661 819 2
33
571
1 0 1
0
66 46 2
73
82
521 664 2
195
865
1 0 2
0
2
1 3 2
0
2
155 678 2
584
628
70 125 2
55
796
958 547 2
37
500
0 1 1
1
237 589 2
418
886
25 605 2
537
570
756 219 2
264
618
1 0 2
0
2
506 607 2
365
676
515 917 2
514
516
16 13 2
31
74
7 4 2
4
5
175 645 2
174
176
942 1...

output:

0
330
0
32
260
0
0
77
34
478
1
118
12
377
0
252
257
7
3
87
470
0
0
187
98
452
292
138
38
1
0
106
468
1
256
48
239
291
38
0
1
1
228
162
0
235
346
93
480
7
1
421
156
0
4
377
357
1
49
1
0
107
3
1
300
114
1
101
403
9
37
75
98
413
86
237
0
461
421
307
1
223
1
0
3
430
445
323
1
0
283
1
7
279
0
1
489
331
1...

result:

wrong answer Diff at 1-th number: read 0 but expected 3