QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#65006#4741. PowódźGuanYunchang70 149ms73732kbC++141.6kb2022-11-26 12:03:312022-11-26 12:03:35

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 4ms
memory: 13984kb

input:

3 2 2
1
1
1
1 2
1 1

output:

65

result:

ok 1 number(s): "65"

Test #2:

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

input:

1 10 4
1 2 1 4 1 4 1 2 2

output:

8883

result:

ok 1 number(s): "8883"

Test #3:

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

input:

10 1 4
4
3
3
4
3
2
3
2
3

output:

520325

result:

ok 1 number(s): "520325"

Test #4:

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

input:

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

output:

7729

result:

ok 1 number(s): "7729"

Test #5:

score: 0
Accepted
time: 2ms
memory: 13768kb

input:

3 3 4
4 3
3 3
4 3
2 2 2
2 4 1

output:

17921

result:

ok 1 number(s): "17921"

Test #6:

score: 0
Accepted
time: 1ms
memory: 13832kb

input:

3 3 4
4 4
4 4
4 4
4 4 4
4 4 4

output:

1953125

result:

ok 1 number(s): "1953125"

Test #7:

score: 0
Accepted
time: 2ms
memory: 13844kb

input:

3 3 4
4 4
4 4
4 4
4 1 4
1 4 1

output:

42875

result:

ok 1 number(s): "42875"

Test #8:

score: 0
Accepted
time: 2ms
memory: 13832kb

input:

3 3 4
4 4
1 1
1 4
1 4 1
1 1 4

output:

3275

result:

ok 1 number(s): "3275"

Test #9:

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

input:

3 3 4
1 4
4 4
4 1
1 1 1
1 1 1

output:

515

result:

ok 1 number(s): "515"

Test #10:

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

input:

3 3 4
2 3
1 3
1 1
2 1 1
3 3 1

output:

953

result:

ok 1 number(s): "953"

Test #11:

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

input:

3 3 4
1 2
2 2
1 3
2 2 3
1 4 2

output:

3647

result:

ok 1 number(s): "3647"

Subtask #2:

score: 20
Accepted

Dependency #1:

100%
Accepted

Test #12:

score: 20
Accepted
time: 0ms
memory: 13888kb

input:

20 50 1000000
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ...

output:

170547121

result:

ok 1 number(s): "170547121"

Test #13:

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

input:

20 50 1000000000
10000046 10000067 10000092 10000047 10000084 10000028 10000023 10000074 10000049 10000063 10000089 10000065 10000049 10000047 10000023 10000040 10000083 10000064 10000045 10000019 10000084 10000093 10000034 10000080 10000065 10000039 10000085 10000029 10000052 10000001 10000074 1000...

output:

953602992

result:

ok 1 number(s): "953602992"

Test #14:

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

input:

20 50 1000000000
18631670 424283007 439843407 347131510 105575359 872921168 945764761 763130994 465896030 153905519 541741804 393795151 979905640 830133551 520704830 997519088 64792655 348110406 617681465 423518890 930074544 731784104 344914030 735361107 304445746 158645919 551514530 116387391 32473...

output:

329080003

result:

ok 1 number(s): "329080003"

Test #15:

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

input:

5 200 1000
881 81 335 253 542 849 8 294 165 714 520 794 83 524 715 148 908 474 152 679 857 286 84 156 182 735 340 328 473 234 44 113 807 529 927 179 994 462 894 227 970 912 96 599 568 460 538 142 576 737 269 450 824 389 973 607 745 274 92 685 273 273 236 488 600 950 488 228 185 100 391 476 134 8 289...

output:

369972116

result:

ok 1 number(s): "369972116"

Test #16:

score: 0
Accepted
time: 1ms
memory: 13980kb

input:

200 5 1000
807 817 476 957
393 692 7 749
533 61 924 211
478 887 969 597
524 801 913 845
282 66 904 655
486 290 337 200
934 615 519 707
697 173 503 823
812 631 982 255
497 770 790 88
102 155 149 595
90 90 49 458
56 958 561 821
450 619 999 948
299 897 856 810
102 461 395 690
478 382 11 754
396 306 426...

output:

946940256

result:

ok 1 number(s): "946940256"

Test #17:

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

input:

100 20 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000...

output:

0

result:

ok 1 number(s): "0"

Test #18:

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

input:

30 50 1000000000
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 1000000000 1000000000 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 1000000000 1000000000 1 1 1 1 1 1 1000000000 1000000000 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1000000000 100000...

output:

892617320

result:

ok 1 number(s): "892617320"

Test #19:

score: 0
Accepted
time: 1ms
memory: 13920kb

input:

10 200 100
1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1...

output:

749218615

result:

ok 1 number(s): "749218615"

Test #20:

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

input:

40 40 100000
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
1 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
1 1 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27...

output:

427808075

result:

ok 1 number(s): "427808075"

Test #21:

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

input:

1 2000 2000
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 ...

output:

365900122

result:

ok 1 number(s): "365900122"

Test #22:

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

input:

1 2000 2000
1999 1998 1997 1996 1995 1994 1993 1992 1991 1990 1989 1988 1987 1986 1985 1984 1983 1982 1981 1980 1979 1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 1953 1952 1951 1950 1949 1948 1947 1946 1945 1944 1943 194...

output:

365900122

result:

ok 1 number(s): "365900122"

Test #23:

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

input:

2000 1 1000000000
398534875
116162463
486023833
619011736
802775073
140162758
491033298
609403043
164451190
531565587
590928679
808372598
896490035
728609092
739314764
394458434
970784327
67682173
100982258
501958061
213460980
640551256
458732338
359443653
19306582
116743879
809148348
16693732
67254...

output:

163302527

result:

ok 1 number(s): "163302527"

Test #24:

score: 0
Accepted
time: 2ms
memory: 13840kb

input:

1 1000 1000
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 ...

output:

616547549

result:

ok 1 number(s): "616547549"

Subtask #3:

score: 20
Accepted

Dependency #1:

100%
Accepted

Test #25:

score: 20
Accepted
time: 22ms
memory: 26528kb

input:

200 500 5
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ...

output:

971459291

result:

ok 1 number(s): "971459291"

Test #26:

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

input:

445 445 5
3 5 4 5 2 1 3 2 5 3 3 4 2 2 1 1 4 5 4 5 4 4 5 1 3 1 1 4 4 1 1 5 4 5 3 3 5 2 1 2 2 5 4 2 2 2 2 4 2 2 4 3 3 2 5 4 1 5 1 1 3 1 4 1 4 3 3 3 4 1 3 4 5 5 2 1 1 5 5 4 5 3 3 2 2 3 4 5 2 5 4 2 3 1 3 3 4 3 3 1 3 2 3 4 3 5 3 1 5 3 1 5 4 4 1 4 2 4 3 5 1 1 3 3 5 5 1 5 4 5 2 4 4 4 3 4 2 4 2 4 1 5 4 5 2 ...

output:

290571952

result:

ok 1 number(s): "290571952"

Test #27:

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

input:

400 500 5
4 2 2 2 2 3 2 4 2 4 4 2 4 2 4 2 4 3 4 4 2 4 2 2 3 4 4 4 2 3 4 3 3 3 2 4 3 2 3 4 3 4 4 2 4 3 2 4 4 4 3 3 4 3 2 2 3 4 2 2 4 4 4 2 3 4 4 4 3 2 2 4 3 4 2 2 4 4 3 4 3 2 2 2 4 4 3 3 3 4 2 2 4 3 2 4 3 3 3 3 4 2 2 3 4 3 3 2 3 3 2 4 2 3 3 3 2 4 3 3 4 4 4 3 2 2 2 2 3 4 2 4 2 3 2 3 2 2 3 2 4 4 2 3 3 ...

output:

158748992

result:

ok 1 number(s): "158748992"

Test #28:

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

input:

100 100 5
1 5 5 5 5 1 5 5 5 5 5 5 5 5 5 5 5 1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 1 5 5 5 5 5 5 5 5 5 5 5 1 5 5 5 5 5 5 5 5 5 5 5 5 1 5 5 1 5 5 5 1 5 5 5 5 5 5 1 5 5 5 5 5 1 5 5 5 5 5 5
5 5 5 1 5 5 1 1 5 5 5 1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 1 5 5 5 5 5 5 5 1 5 5 5 5 5 ...

output:

629077254

result:

ok 1 number(s): "629077254"

Test #29:

score: 0
Accepted
time: 2ms
memory: 14336kb

input:

100 100 5
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 5 5 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 5 5 1 1 1 1 1 1 1 1 ...

output:

622773792

result:

ok 1 number(s): "622773792"

Test #30:

score: 0
Accepted
time: 17ms
memory: 22800kb

input:

20 5000 5
1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 5 1 ...

output:

607723524

result:

ok 1 number(s): "607723524"

Test #31:

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

input:

1 100000 5
1 1 3 2 2 4 3 3 4 5 3 1 3 3 5 2 4 5 3 2 5 3 3 1 5 5 4 4 1 3 2 3 1 4 5 5 3 3 5 5 4 2 2 3 2 1 1 2 4 3 1 2 3 3 4 3 3 4 1 3 4 3 2 3 3 3 3 2 2 3 4 1 3 3 3 2 5 2 5 2 3 5 2 1 2 1 1 3 4 2 2 4 4 4 3 2 1 3 4 5 5 1 1 3 2 1 2 3 3 3 1 2 4 5 2 5 3 1 5 1 5 3 3 3 2 1 5 2 4 2 5 2 2 3 4 5 2 2 5 5 4 5 3 3 2...

output:

643749194

result:

ok 1 number(s): "643749194"

Test #32:

score: 0
Accepted
time: 15ms
memory: 24624kb

input:

100000 1 5
4
3
4
3
1
4
5
3
4
4
3
4
3
4
2
1
5
1
2
4
4
1
1
3
1
2
5
2
3
1
4
1
3
1
2
2
3
5
3
5
2
2
4
4
3
1
4
3
3
1
2
2
3
2
2
4
3
4
2
3
2
1
5
4
2
3
3
3
1
4
5
5
1
5
3
2
1
3
3
5
4
4
4
4
4
3
1
4
5
2
5
2
4
4
1
3
2
2
1
4
1
4
1
4
4
3
3
5
4
4
1
2
3
2
1
4
4
5
2
2
5
5
2
2
1
2
3
3
1
4
2
3
1
3
5
1
4
5
4
4
5
4
3
3
1...

output:

74770400

result:

ok 1 number(s): "74770400"

Subtask #4:

score: 20
Accepted

Test #33:

score: 20
Accepted
time: 16ms
memory: 27348kb

input:

1 100000 1000
166 614 949 2 12 578 299 170 238 139 139 372 799 9 51 816 997 859 97 850 583 664 233 849 49 679 706 801 937 65 81 858 853 83 56 882 459 392 897 844 734 141 676 75 570 636 673 415 442 243 887 397 904 174 40 523 178 937 206 82 515 500 558 79 595 175 416 634 343 194 307 205 821 743 720 45...

output:

146179207

result:

ok 1 number(s): "146179207"

Test #34:

score: 0
Accepted
time: 20ms
memory: 30504kb

input:

100000 1 1000000000
819871275
769249822
49880450
466428026
819482075
687081154
257984054
522777003
244953370
721207440
746039961
520955695
988475172
782303686
418914210
937770960
90018053
425487954
41739587
118026105
141005785
363528873
983963383
205384665
622985725
500870812
362780970
541948003
116...

output:

212895976

result:

ok 1 number(s): "212895976"

Test #35:

score: 0
Accepted
time: 144ms
memory: 72528kb

input:

500000 1 10000000
8124231
8139566
8067722
8247139
8491399
8069713
8281872
8219066
8435757
8064629
8469417
8116648
8128853
8256643
8114005
8008523
8262529
8378350
8243345
8301854
8334623
8181161
8009989
8016331
8359038
8294039
8305470
8117959
8307018
8185069
8373221
8018982
8265631
8012023
8119737
80...

output:

789776572

result:

ok 1 number(s): "789776572"

Test #36:

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

input:

1 500000 500000
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:

958154505

result:

ok 1 number(s): "958154505"

Test #37:

score: 0
Accepted
time: 66ms
memory: 72744kb

input:

1 500000 500000
499999 499998 499997 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960 4999...

output:

958154505

result:

ok 1 number(s): "958154505"

Test #38:

score: 0
Accepted
time: 95ms
memory: 73384kb

input:

500000 1 10000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
8000000
80...

output:

393326022

result:

ok 1 number(s): "393326022"

Test #39:

score: 0
Accepted
time: 67ms
memory: 71584kb

input:

500000 1 10000000
4
3
4
3
3
4
3
2
2
4
4
2
3
2
4
4
4
4
2
2
2
4
3
4
3
4
3
2
2
2
3
4
2
4
2
2
4
4
3
4
3
3
3
3
3
2
4
3
2
4
2
2
2
2
2
2
4
4
2
3
2
2
3
3
3
2
3
2
3
3
4
4
2
3
2
2
3
4
4
2
4
3
2
2
2
3
2
4
2
3
3
3
2
3
2
2
2
4
3
3
4
2
4
4
4
4
2
4
3
2
3
3
4
2
4
2
2
4
2
2
4
3
4
2
2
4
3
3
3
2
4
4
2
4
2
3
4
4
2
3
2
...

output:

762531889

result:

ok 1 number(s): "762531889"

Test #40:

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

input:

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

output:

44735654

result:

ok 1 number(s): "44735654"

Test #41:

score: 0
Accepted
time: 15ms
memory: 31204kb

input:

1 100000 100000
99999 99998 99997 99996 99995 99994 99993 99992 99991 99990 99989 99988 99987 99986 99985 99984 99983 99982 99981 99980 99979 99978 99977 99976 99975 99974 99973 99972 99971 99970 99969 99968 99967 99966 99965 99964 99963 99962 99961 99960 99959 99958 99957 99956 99955 99954 99953 99...

output:

44735654

result:

ok 1 number(s): "44735654"

Test #42:

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

input:

100000 1 1000000000
868467946
879102077
556608519
900267986
493694174
52081019
765386749
316479420
822346094
494083606
399754378
827546691
623221959
147125986
267321540
550888219
469665265
724953898
447529844
910474032
979223048
240224373
45902204
168305508
166190793
920543747
336760574
422299368
12...

output:

540460232

result:

ok 1 number(s): "540460232"

Test #43:

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

input:

1 300000 300000
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:

427857066

result:

ok 1 number(s): "427857066"

Test #44:

score: 0
Accepted
time: 45ms
memory: 51736kb

input:

1 300000 300000
299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 2999...

output:

427857066

result:

ok 1 number(s): "427857066"

Test #45:

score: 0
Accepted
time: 149ms
memory: 73732kb

input:

500000 1 1000000000
145933993
253929013
49295441
645670609
143450894
259598339
72707906
312713303
113854738
486869687
23245217
997673612
156935434
689132136
43824095
765617036
133904783
968382382
643074740
466990959
627926669
853798473
201229973
714318416
635498563
481624495
316384431
221850173
1176...

output:

516638533

result:

ok 1 number(s): "516638533"

Subtask #5:

score: 0
Runtime Error

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #46:

score: 0
Runtime Error

input:

1000 500 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 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...

output:


result: