QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#144351#4188. Excursion to PorvooMaMengQiTL 57ms12876kbC++202.3kb2023-08-21 16:22:362023-08-21 16:22:39

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 5832kb

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: 2ms
memory: 5852kb

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: 2ms
memory: 5936kb

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: 0
Accepted
time: 49ms
memory: 12876kb

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:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
imp...

result:

ok 100000 lines

Test #5:

score: 0
Accepted
time: 57ms
memory: 12836kb

input:

100000 99999
1 3240 695579
2 385 552750
3 7763 316283
4 6298 391224
5 9171 441170
6 4647 574157
7 3537 767389
8 9359 115301
9 2611 186845
10 3412 270551
11 1631 147510
12 8359 47455
13 6196 156351
14 2211 798509
15 1233 65941
16 9084 530631
17 9554 349540
18 7990 248755
19 5648 182526
20 6027 579169...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
imp...

result:

ok 100000 lines

Test #6:

score: -100
Time Limit Exceeded

input:

100000 99999
1 4493 1000000
2 7727 1000000
3 6145 1000000
4 4865 1000000
5 9695 1000000
6 5798 1000000
7 4753 1000000
8 8634 1000000
9 2508 1000000
10 7667 1000000
11 9516 1000000
12 8464 1000000
13 6427 1000000
14 2965 1000000
15 6283 1000000
16 6283 1000000
17 5820 1000000
18 6064 1000000
19 5782 ...

output:


result: