QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#63239#5082. Frog JumpZhaoZiLongTL 990ms171192kbJava111.4kb2022-11-21 06:02:392022-11-21 06:02:41

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 67ms
memory: 35092kb

input:

4 3
0 2
0 3
3 5
6 7
4 2 3

output:

2

result:

ok single line: '2'

Test #2:

score: 0
Accepted
time: 57ms
memory: 34760kb

input:

4 3
0 2
0 3
3 5
6 7
2 3 2

output:

0

result:

ok single line: '0'

Test #3:

score: 0
Accepted
time: 68ms
memory: 35256kb

input:

8 5
1 8
2 4
5 11
13 15
15 17
16 18
19 22
20 22
3 7 4 6 3

output:

6

result:

ok single line: '6'

Test #4:

score: 0
Accepted
time: 68ms
memory: 35296kb

input:

8 5
1 5
5 10
10 15
15 20
20 25
25 30
30 35
35 40
3 7 4 6 3

output:

0

result:

ok single line: '0'

Test #5:

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

input:

10 7
1 5
5 10
10 15
15 20
20 25
25 30
30 35
35 40
41 50
50 60
3 7 4 6 3 9 10

output:

1

result:

ok single line: '1'

Test #6:

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

input:

10 10
1 5
5 10
10 15
15 20
20 25
25 30
30 35
35 40
41 50
50 60
3 7 4 6 3 9 10 5 1 9

output:

3

result:

ok single line: '3'

Test #7:

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

input:

6 11
0 1
2 3
4 5
6 7
8 9
10 11
1 2 3 4 5 6 5 4 3 2 1

output:

10

result:

ok single line: '10'

Test #8:

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

input:

13 14
0 2
1 3
2 4
4 6
10 15
11 13
12 15
20 25
27 29
28 30
33 35
34 36
35 37
3 4 8 11 13 8 6 10 4 7 9 10 9 9

output:

53

result:

ok single line: '53'

Test #9:

score: 0
Accepted
time: 58ms
memory: 34852kb

input:

14 25
0 22
1 5
5 10
12 16
14 20
20 24
27 33
30 38
34 40
34 45
47 53
49 55
55 60
60 65
2 5 4 6 10 8 7 9 12 11 14 13 9 10 7 8 4 5 1 2 6 5 3 8 10

output:

13

result:

ok single line: '13'

Test #10:

score: 0
Accepted
time: 55ms
memory: 35132kb

input:

14 25
0 22
1 5
5 10
12 16
14 20
20 24
27 33
30 38
34 40
34 45
47 53
49 55
55 60
60 65
2 5 4 6 5 1 3 2 6 5 1 1 3 2 2 5 6 6 1 2 3 4 4 5 2

output:

0

result:

ok single line: '0'

Test #11:

score: 0
Accepted
time: 413ms
memory: 70924kb

input:

100000 100000
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...

output:

99999

result:

ok single line: '99999'

Test #12:

score: 0
Accepted
time: 683ms
memory: 147776kb

input:

100000 1000000
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
...

output:

1899981

result:

ok single line: '1899981'

Test #13:

score: 0
Accepted
time: 818ms
memory: 148728kb

input:

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

output:

0

result:

ok single line: '0'

Test #14:

score: 0
Accepted
time: 956ms
memory: 147264kb

input:

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

output:

1710000

result:

ok single line: '1710000'

Test #15:

score: 0
Accepted
time: 637ms
memory: 151016kb

input:

100000 1000000
0 1
1000 1001
2000 2001
3000 3001
4000 4001
5000 5001
6000 6001
7000 7001
8000 8001
9000 9001
10000 10001
11000 11001
12000 12001
13000 13001
14000 14001
15000 15001
16000 16001
17000 17001
18000 18001
19000 19001
20000 20001
21000 21001
22000 22001
23000 23001
24000 24001
25000 25001...

output:

1898081019

result:

ok single line: '1898081019'

Test #16:

score: 0
Accepted
time: 674ms
memory: 149656kb

input:

100000 1000000
0 1
1000 1001
2000 2001
3000 3001
4000 4001
5000 5001
6000 6001
7000 7001
8000 8001
9000 9001
10000 10001
11000 11001
12000 12001
13000 13001
14000 14001
15000 15001
16000 16001
17000 17001
18000 18001
19000 19001
20000 20001
21000 21001
22000 22001
23000 23001
24000 24001
25000 25001...

output:

99898901100999

result:

ok single line: '99898901100999'

Test #17:

score: 0
Accepted
time: 800ms
memory: 144304kb

input:

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

output:

89999910000

result:

ok single line: '89999910000'

Test #18:

score: 0
Accepted
time: 990ms
memory: 171192kb

input:

100000 1000000
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
...

output:

99998900001

result:

ok single line: '99998900001'

Test #19:

score: 0
Accepted
time: 749ms
memory: 152072kb

input:

100000 1000000
0 1
1000 1001
2000 2001
3000 3001
4000 4001
5000 5001
6000 6001
7000 7001
8000 8001
9000 9001
10000 10001
11000 11001
12000 12001
13000 13001
14000 14001
15000 15001
16000 16001
17000 17001
18000 18001
19000 19001
20000 20001
21000 21001
22000 22001
23000 23001
24000 24001
25000 25001...

output:

23393761453368

result:

ok single line: '23393761453368'

Test #20:

score: 0
Accepted
time: 734ms
memory: 151264kb

input:

100000 1000000
0 1
1000 1001
2000 2001
3000 3001
4000 4001
5000 5001
6000 6001
7000 7001
8000 8001
9000 9001
10000 10001
11000 11001
12000 12001
13000 13001
14000 14001
15000 15001
16000 16001
17000 17001
18000 18001
19000 19001
20000 20001
21000 21001
22000 22001
23000 23001
24000 24001
25000 25001...

output:

36210751926075

result:

ok single line: '36210751926075'

Test #21:

score: 0
Accepted
time: 780ms
memory: 144632kb

input:

100000 1000000
250 77313008
639 795104759
4914 260482167
7347 587490367
10804 17115580
12197 335448455
12252 592081936
12633 893562902
21551 651916319
27051 470581984
28774 881490168
35517 16417220
39058 21328451
41337 483500381
43756 740464747
45842 411312383
47619 401055682
56006 706089931
57490 7...

output:

0

result:

ok single line: '0'

Test #22:

score: 0
Accepted
time: 896ms
memory: 148532kb

input:

100000 1000000
282 107048439
4403 305378629
13402 27000377
17818 408950410
18928 428924854
19409 92912943
28529 47724576
31476 242244483
31899 199510232
41280 14659285
41451 300049859
44110 465583588
47274 266197817
50361 166975418
54823 18976096
69975 451791096
79504 329580164
80341 399743786
84373...

output:

2029128948

result:

ok single line: '2029128948'

Test #23:

score: 0
Accepted
time: 692ms
memory: 144076kb

input:

100000 1000000
13286 94927
28911 355597
44215 337605
66747 718864
67667 338138
72806 709992
73242 809197
89489 656349
107058 693816
108707 798596
109030 478427
119237 416935
129997 438974
133032 141755
134534 833011
137875 580040
143284 530014
147134 412870
147426 303891
148649 148916
149680 227674
...

output:

3758886268357

result:

ok single line: '3758886268357'

Test #24:

score: 0
Accepted
time: 694ms
memory: 144964kb

input:

100000 1000000
3009 785588
4965 602298
17211 594326
25231 369145
25926 319526
41977 814433
43538 622870
45913 553408
65345 440774
70173 819844
75787 976652
80081 325874
82016 199506
82771 522115
86631 518196
87109 295202
90333 270431
97113 205312
105567 201324
111895 636283
112324 771941
112829 5926...

output:

3636123778070

result:

ok single line: '3636123778070'

Test #25:

score: 0
Accepted
time: 722ms
memory: 148332kb

input:

100000 1000000
2997 3473
6431 6472
7509 8026
9973 10201
19486 19798
45906 46278
51526 51890
56163 57085
63369 63476
91820 92034
94937 95107
111336 112235
111359 111543
116843 117662
117615 118223
120566 121138
130978 131159
135561 136446
147970 148695
150404 151133
157882 158208
168461 169014
169551...

output:

317303027980377

result:

ok single line: '317303027980377'

Test #26:

score: -100
Time Limit Exceeded

input:

100000 1000000
80 556
1333 1659
4603 5314
12840 13686
15011 15181
19980 20540
33688 34290
57242 57503
70639 71150
70744 71443
70973 71933
101402 102029
122114 122634
149151 149971
149232 149740
162030 162332
166814 167536
184607 184795
189647 189902
197599 197855
201010 201412
224780 224910
227237 2...

output:

317104704899621

result: