QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#503028#1474. Margaritas on the River Walkxiaowuc1100 ✓56ms39056kbJava81.9kb2024-08-03 15:55:222024-08-03 15:55:23

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 100
Accepted
time: 56ms
memory: 39056kb

input:

6
6 25
8 9 8 7 16 5
30 250
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
3 10
12 13 14
8 30
5 5 5 5 5 5 5 5
12 30
2 3 3 4 4 4 5 5 5 5
6 6
30 300
16 16 15 15 14 14 13 13 13 12
12 12 12 11 11 11 11 11 10 10
10 10 10 10 9 9 9 9 9 9

output:

1 15
2 16509438
3 0
4 28
5 513
6 52082

result:

ok 6 lines