QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#874161#9732. Gathering Mushroomsucup-team3556TL 571ms27756kbC++175.5kb2025-01-27 17:33:292025-01-27 17:33:30

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 6ms
memory: 27756kb

input:

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

output:

41
45
14

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 571ms
memory: 27312kb

input:

6000
19 48
18 19 18 19 11 9 15 19 12 18 11 18 9 18 9 18 19 11 15
12 14 18 8 1 3 19 5 13 14 15 2 14 5 19 2 19 12 9
15 23
3 1 1 3 6 1 4 1 1 6 6 4 12 4 6
14 1 8 8 6 6 12 14 6 8 5 7 14 2 5
9 140979583
4 5 8 9 2 7 6 8 2
8 9 4 6 9 2 4 7 8
4 976357580
2 3 1 3
2 1 1 4
6 508962809
4 3 4 3 4 4
4 5 4 5 5 6
13 ...

output:

3420
260
254
26
84
759
126
30
1092
1
2493
2422
168
360
298
324
2424
2520
220
228
1107
9
3486
1
796
81
340
272
600
3196
32
495
40
128
140
665
1635
702
68
96
90
288
29
588
16
234
445
2928
140
40
477
1197
19
1994
1082
32
522
672
20
390
32
2204
1938
42
21
885
4
1539
196
420
11
1709
801
720
1
556
40
17
2...

result:

ok 6000 lines

Test #3:

score: -100
Time Limit Exceeded

input:

1
200000 40000
46988 88148 28442 9596 17281 27561 58024 1062 138912 175273 194682 27958 11240 187099 28869 177531 154933 83035 11300 178646 6952 44234 168671 169483 187602 178519 99885 98196 64731 100802 16974 85402 50616 126862 159025 116795 83016 127770 3067 56860 19833 64583 11977 100045 198272 1...

output:


result: