QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#443885#8584. 바이러스ZhaoZiLong40 223ms21664kbC++203.6kb2024-06-15 16:44:302024-06-15 16:44:46

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 0ms
memory: 12492kb

input:

8 5
0 1
1 2
2 3
3 4
4 5
5 6
6 7
2 2
5 0
7 0
1 1
4 1
40 5 5 16 32 8 1 10

output:

0
24
-1
5
16

result:

ok 5 lines

Test #2:

score: 5
Accepted
time: 0ms
memory: 12392kb

input:

1 2
0 0
0 0
1000000000

output:

0
1000000000

result:

ok 2 lines

Test #3:

score: 5
Accepted
time: 0ms
memory: 12400kb

input:

1 1
0 0
1

output:

0

result:

ok single line: '0'

Test #4:

score: 5
Accepted
time: 0ms
memory: 12540kb

input:

5 5
0 1
1 2
2 3
3 4
4 4
3 4
3 4
4 4
3 3
205776802 419505279 604355565 320588676 267287300

output:

0
205776802
205776802
205776802
205776802

result:

ok 5 lines

Test #5:

score: 5
Accepted
time: 2ms
memory: 12488kb

input:

5 5
0 1
1 2
2 3
3 4
0 1
2 4
3 2
2 2
0 3
798595430 17544794 263282020 749935522 265537216

output:

0
17544794
17544794
17544794
17544794

result:

ok 5 lines

Test #6:

score: 5
Accepted
time: 0ms
memory: 12568kb

input:

5 5
0 1
1 2
2 3
3 4
4 0
3 0
0 0
1 1
1 0
805814316 68727170 931548944 955566578 268585692

output:

0
-1
-1
-1
-1

result:

ok 5 lines

Test #7:

score: 5
Accepted
time: 0ms
memory: 12492kb

input:

5 5
0 1
1 2
2 3
3 4
3 4
0 4
2 4
2 4
2 4
140258399 508694682 846494800 923720900 238592045

output:

0
140258399
140258399
140258399
140258399

result:

ok 5 lines

Test #8:

score: 5
Accepted
time: 0ms
memory: 12368kb

input:

10 10
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
8 7
3 7
9 8
0 5
5 7
4 3
2 9
6 9
7 8
4 8
998183090 584072254 887174893 11448861 742483923 59447072 545713676 980826811 811598242 35544321

output:

0
11448861
11448861
11448861
11448861
11448861
11448861
11448861
11448861
11448861

result:

ok 10 lines

Test #9:

score: 5
Accepted
time: 0ms
memory: 12392kb

input:

10 10
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
2 5
5 4
9 5
2 9
5 2
6 4
2 4
8 4
9 7
2 0
911698130 382043019 90722009 440968421 571375991 137522383 377189267 211855539 341720684 687999451

output:

0
90722009
137522383
90722009
137522383
90722009
90722009
137522383
90722009
90722009

result:

ok 10 lines

Test #10:

score: 5
Accepted
time: 0ms
memory: 12544kb

input:

10 10
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
3 3
2 5
0 4
3 2
5 1
1 0
4 2
8 0
3 2
3 0
892608355 903586083 572266475 47500884 6301829 729660024 455211808 942317353 131889193 801254776

output:

0
6301829
6301829
6301829
6301829
903586083
6301829
-1
6301829
47500884

result:

ok 10 lines

Test #11:

score: 5
Accepted
time: 0ms
memory: 12588kb

input:

10 10
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
0 9
9 9
4 9
0 9
7 9
8 9
0 9
6 9
5 9
4 9
95389682 395000358 484533614 652845161 327306317 799690376 871884048 751786316 693371321 784309957

output:

0
95389682
95389682
95389682
95389682
95389682
95389682
95389682
95389682
95389682

result:

ok 10 lines

Test #12:

score: 5
Accepted
time: 0ms
memory: 12508kb

input:

20 20
0 1
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
2 12
0 12
5 17
7 14
6 16
1 19
13 18
6 14
4 9
0 18
18 18
6 11
0 13
15 17
1 8
6 18
9 9
13 16
6 19
2 15
436523225 735146636 641656461 569341995 381628222 450451359 605334108 99712125 988489106 717299297...

output:

0
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125
99712125

result:

ok 20 lines

Test #13:

score: 5
Accepted
time: 0ms
memory: 12492kb

input:

20 20
0 1
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
13 3
6 4
16 1
19 19
19 17
5 2
5 7
12 7
6 18
12 11
18 11
11 5
13 13
15 19
19 3
9 7
16 7
16 6
5 7
8 9
999021218 83246177 270836731 525612430 672541663 476653247 839288054 764153704 941216586 648134044 ...

output:

0
348015639
499890278
77178908
77178908
553832155
160425085
77178908
77178908
77178908
77178908
77178908
77178908
77178908
300536180
77178908
77178908
77178908
160425085
77178908

result:

ok 20 lines

Test #14:

score: 5
Accepted
time: 0ms
memory: 12408kb

input:

20 20
0 1
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
12 8
12 4
19 3
8 0
12 0
16 0
4 0
12 1
3 3
9 6
11 5
6 7
14 9
8 5
15 2
8 5
8 2
0 2
18 3
16 7
346014551 491695164 57622712 97722771 993912839 996909253 733512353 277580504 195751201 438876633 523544328 ...

output:

0
195751201
519350473
195751201
377943706
519350473
993912839
377943706
253373913
195751201
195751201
195751201
195751201
195751201
519350473
195751201
195751201
253373913
519350473
377943706

result:

ok 20 lines

Test #15:

score: 5
Accepted
time: 0ms
memory: 12464kb

input:

20 20
0 1
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
7 19
5 19
8 19
17 19
14 19
19 19
15 19
14 19
12 19
15 19
9 19
1 19
0 19
2 19
8 19
8 19
4 19
8 19
13 19
1 19
69882800 452312168 666117339 829711627 782632700 231822906 990022913 818955019 160583703 53...

output:

0
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683
2957683

result:

ok 20 lines

Test #16:

score: 5
Accepted
time: 0ms
memory: 12672kb

input:

500 500
0 1
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 52...

output:

0
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
15461593
5660055
9594340
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
5660055
18867951
5660055
...

result:

ok 500 lines

Test #17:

score: 5
Accepted
time: 0ms
memory: 12364kb

input:

500 500
0 1
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 52...

output:

0
1835541
39136776
9642798
1835541
1835541
3122805
3122805
1835541
1835541
1835541
1835541
1835541
1835541
1835541
75659436
1835541
3122805
1835541
1835541
1835541
1835541
3122805
1835541
1835541
1835541
3122805
3122805
3122805
3122805
1835541
3122805
1835541
1835541
3122805
1835541
1835541
1835541
...

result:

ok 500 lines

Test #18:

score: 5
Accepted
time: 0ms
memory: 12484kb

input:

500 500
0 1
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 52...

output:

0
15059089
6799303
6799303
6799303
7283744
6799303
11520777
6799303
6799303
40534885
14863038
6799303
7283744
6799303
11520777
7840730
6799303
7283744
6799303
51471677
11520777
7283744
40534885
7840730
7283744
6799303
6799303
7283744
6799303
6799303
40515088
40534885
6799303
6799303
40515088
1486303...

result:

ok 500 lines

Test #19:

score: 5
Accepted
time: 0ms
memory: 12564kb

input:

500 500
0 1
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 52...

output:

0
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
296569
2965...

result:

ok 500 lines

Subtask #2:

score: 8
Accepted

Dependency #1:

100%
Accepted

Test #20:

score: 8
Accepted
time: 0ms
memory: 13308kb

input:

5000 5000
0 1
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
357202
357202
357202
357202
357202
357202
357202
357202
357202
357202
357202
357202
357202
357202
471014
357202
357202
357202
357202
471014
357202
357202
357202
357202
357202
357202
357202
357202
357202
471014
357202
357202
471014
357202
357202
357202
471014
357202
471014
471014
357202
471014
3572...

result:

ok 5000 lines

Test #21:

score: 8
Accepted
time: 9ms
memory: 13156kb

input:

5000 5000
0 1
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
318116
318116
2453747
318116
1295185
318116
318116
318116
318116
318116
318116
318116
318116
318116
2662212
318116
318116
318116
318116
4116663
318116
318116
318116
965483
318116
318116
318116
318116
318116
318116
318116
318116
2453747
965483
318116
318116
318116
318116
318116
318116
318116
318116...

result:

ok 5000 lines

Test #22:

score: 8
Accepted
time: 7ms
memory: 13320kb

input:

5000 5000
0 1
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
108835
718123
711556
108835
854767
108835
5013848
2626157
718123
2184570
108835
108835
711556
1696752
854767
711556
711556
854767
108835
3053622
108835
108835
711556
108835
108835
108835
711556
3227850
108835
108835
108835
711556
108835
711556
108835
1696752
108835
711556
711556
108835
2133476
227...

result:

ok 5000 lines

Test #23:

score: 8
Accepted
time: 3ms
memory: 13128kb

input:

5000 5000
0 1
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
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
66133
6613...

result:

ok 5000 lines

Test #24:

score: 8
Accepted
time: 4ms
memory: 13168kb

input:

5000 5000
0 1
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
1377425856
1028983153
9485538478
3452534969
1804173843
1634860890
8708348252
1821421203
3133671853
1287774037
6419727383
3031362618
7166669022
7916465186
4455509207
1513813067
5511961737
2693040650
2560474501
2695762132
6020924333
2031936144
6081836278
729039375
8758966485
3991251425
5683032929
24...

result:

ok 5000 lines

Subtask #3:

score: 27
Accepted

Dependency #2:

100%
Accepted

Test #25:

score: 27
Accepted
time: 90ms
memory: 21596kb

input:

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

output:

0
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
12921
1292...

result:

ok 100000 lines

Test #26:

score: 27
Accepted
time: 155ms
memory: 21604kb

input:

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

output:

0
92505
92505
156629
42862
7540
7540
9697
7540
7540
7540
7540
7540
9697
9697
7540
7540
7540
7540
92505
92505
26245
9697
7540
7540
7540
7540
9697
9697
9697
9697
7540
7540
9697
92505
69397
7540
7540
7540
7540
7540
9697
7540
76707
7540
7540
7540
7540
9697
92505
26245
7540
9697
7540
9697
7540
7540
92505...

result:

ok 100000 lines

Test #27:

score: 27
Accepted
time: 223ms
memory: 21664kb

input:

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

output:

0
54379
43355
39510
384625
39510
54379
39510
39510
39510
39510
53419
54379
39510
39510
39510
53419
39510
54379
53419
148362
53419
66006
53419
66006
39510
53419
178861
53419
53419
39510
53139
54379
43355
39510
39510
39510
53419
53419
53419
66006
39510
39510
39510
53419
152856
66006
53419
53419
39510
...

result:

ok 100000 lines

Test #28:

score: 27
Accepted
time: 39ms
memory: 21536kb

input:

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

output:

0
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
11837
1183...

result:

ok 100000 lines

Test #29:

score: 27
Accepted
time: 167ms
memory: 21596kb

input:

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

output:

0
34598917
37859045
327465835
16892301
3821590
32482320
46899329
78855855
31357855
81275826
22362679
319613462
26109068
64023551
5916527
23122893
23235714
8313305
43345571
24320703
26215530
16892301
18055830
7658846
76316730
14873846
38637760
12246801
45359471
79901745
79511766
13915610
10871963
165...

result:

ok 100000 lines

Test #30:

score: 27
Accepted
time: 176ms
memory: 19372kb

input:

90000 96036
0 1
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
5...

output:

0
45553908
45334898
45174475
45018542
45553908
45293764
45247893
45503569
45011484
44910795
45121416
45381426
45392900
44910795
45121416
45066049
45449457
45503569
46486693
45368357
45174475
45392900
45174475
45018542
45293764
45503569
45018542
45392900
45247893
45174475
45066049
45511683
45018542
4...

result:

ok 96036 lines

Test #31:

score: 27
Accepted
time: 113ms
memory: 19324kb

input:

90000 90016
0 1
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
5...

output:

0
72180407457
37322422758
88490146510
98728324034
23338409025
31703853041
80467049510
96341120740
40169894739
12708301336
6557026439
44046713322
5377578441
32562651429
59883478467
11711351997
14209688746
50750758344
67908060122
50626027568
3422931225
74270676085
39883369800
60974419131
45351595199
7...

result:

ok 90016 lines

Test #32:

score: 27
Accepted
time: 125ms
memory: 19608kb

input:

90000 90128
0 1
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
5...

output:

0
1880804470
3897762496
2527241536
2978002325
2945563348
884620776
1994287256
3802999091
3736292003
4676478935
3281882524
2986913132
1131617379
1174379406
477233277
4388045811
4857867129
672277985
303518232
3909473738
3894761137
970036335
2569294214
1310172876
4948314617
4115450288
954678852
3113829...

result:

ok 90128 lines

Test #33:

score: 27
Accepted
time: 154ms
memory: 19424kb

input:

90000 90942
0 1
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
5...

output:

0
568182122
578932103
593462011
573866470
572868751
592362933
569820304
573777243
569820304
583269415
575836469
574137356
593369001
593392246
592875459
570054769
579728421
592362933
593392246
571786356
577943553
572917190
583800215
583009616
819583110
573764581
592479143
592479143
590445574
59287545...

result:

ok 90942 lines

Subtask #4:

score: 0
Wrong Answer

Test #34:

score: 0
Wrong Answer
time: 0ms
memory: 12492kb

input:

8 5
0 1
1 2
2 3
3 4
4 5
3 6
3 7
2 2
5 0
7 0
1 1
4 1
40 5 5 16 32 8 1 10

output:

0
24
-1
5
16

result:

wrong answer 3rd lines differ - expected: '10', found: '-1'

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%