QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#144379#4188. Excursion to PorvooZhangYiDeWA 37ms38016kbC++172.2kb2023-08-21 16:28:022023-08-21 16:28:05

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 34888kb

input:

2 2
1 100 300
1 1 30
5
400
500
300
20
1

output:

impossible
impossible
100
1
1

result:

ok 5 lines

Test #2:

score: 0
Accepted
time: 7ms
memory: 34848kb

input:

5 7
1 200 30
2 200 31
3 200 32
4 200 33
1 5000 33
2 5000 33
3 5000 33
3
30
31
33

output:

800
5600
15200

result:

ok 3 lines

Test #3:

score: 0
Accepted
time: 6ms
memory: 34832kb

input:

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

output:

2
3
3

result:

ok 3 lines

Test #4:

score: -100
Wrong Answer
time: 37ms
memory: 38016kb

input:

100000 99999
1 8793 670998
2 3301 949483
3 5662 542705
4 3033 907487
5 7035 366434
6 5771 1750
7 2575 80336
8 5163 613257
9 5748 414726
10 4990 119039
11 5855 239538
12 1965 755221
13 8891 149341
14 3213 674329
15 9189 660274
16 4593 513364
17 793 326875
18 2873 954337
19 3470 105349
20 9374 779965
...

output:

-2387225703185197023
6944656592943724027
-4774451406853099537
-7161677110516686213
-8029759184548631679
1953184667123217029
-3906369332798674822
-1302123110592671750
-6510615554930456554
651061556016440812
-6944656592002038280
-2604246221699054687
-6510615554974781397
-1085102592115566838
-390636933...

result:

wrong answer 1st lines differ - expected: 'impossible', found: '-2387225703185197023'