QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#402687#8126. Restoranihyforces0 0ms14092kbC++202.5kb2024-05-01 10:48:162024-05-01 10:48:18

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Runtime Error

Test #1:

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

input:

1 1
1
1

output:

0
1 1 

result:

ok 

Test #2:

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

input:

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

output:

6
1 1 3 2 2 3 

result:

ok 

Test #3:

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

input:

4999 10
4738 1635 1963 2369 3205 2391 4217 3652 4299 4715
4453 194 1247 3569 2163 1817 1130 2997 1111 3271
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
...

output:

22850
2 3 3 6 4 5 6 7 5 8 8 4 7 10 1 1 10 9 9 2 

result:

ok 

Test #4:

score: 0
Runtime Error

input:

5000 10
4081 160 1439 1557 2086 1753 2818 2417 4018 4079
4849 229 2458 4370 2939 2876 2221 3787 1463 3841
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
3...

output:


result:


Subtask #2:

score: 0
Runtime Error

Test #36:

score: 0
Runtime Error

input:

300000 100000
109370 205978 224742 196992 72895 175835 177858 199406 235175 124763 18605 240852 170753 234091 260042 224910 164378 18209 253733 55514 99033 39740 131545 58235 237944 168314 28570 283886 209944 126973 228465 187033 94132 153369 248330 47334 58875 113999 224027 260133 131708 288915 269...

output:


result:


Subtask #3:

score: 0
Runtime Error

Test #46:

score: 0
Runtime Error

input:

5000 2000
4078 2691 3285 4560 722 2633 1060 29 771 12 1702 164 4924 4572 906 2334 2800 3353 610 3939 4869 2690 3185 2079 2738 199 1926 2000 4985 39 1504 7 1350 3735 4371 1992 4196 555 393 2320 2194 114 831 28 424 1355 2010 3279 4932 3450 4345 4991 2758 96 2884 4840 1778 92 1691 256 666 792 3757 1986...

output:


result:


Subtask #4:

score: 0
Runtime Error

Test #96:

score: 0
Runtime Error

input:

300000 100000
297688 58574 11154 227659 2832 4187 46902 30386 123954 297021 107275 50042 254278 246399 245777 174442 294196 213936 66372 33303 196079 68308 279926 155894 38996 65379 16366 236135 73779 90307 140452 79063 170940 175005 103283 242495 199312 112374 299718 3222 294033 126886 258651 54878...

output:


result: