QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#145050#4188. Excursion to PorvooZhangYiDeWA 180ms8708kbC++201.7kb2023-08-21 21:11:412023-08-21 21:11:42

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3440kb

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: 1ms
memory: 3496kb

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: 1ms
memory: 3496kb

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: 165ms
memory: 8616kb

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: 150ms
memory: 8604kb

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: 0
Accepted
time: 125ms
memory: 8572kb

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:

impossible
impossible
impossible
impossible
impossible
500615062
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impo...

result:

ok 100000 lines

Test #7:

score: 0
Accepted
time: 1ms
memory: 3436kb

input:

2 2
1 1 1
1 2 2
2
2
1

output:

2
1

result:

ok 2 lines

Test #8:

score: 0
Accepted
time: 1ms
memory: 3524kb

input:

2 2
1 2 1
1 1 2
2
2
1

output:

1
1

result:

ok 2 lines

Test #9:

score: 0
Accepted
time: 180ms
memory: 8708kb

input:

100000 99999
62085 7710 1000000
54476 6395 1000000
50744 8690 1000000
59096 7746 1000000
85894 6000 1000000
9112 5240 810968
9921 9917 882969
37118 6732 1000000
47517 3970 1000000
34037 669 1000000
40653 5674 1000000
77749 3030 1000000
23864 2585 1000000
25451 6277 1000000
17532 9729 1000000
3497 93...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
500574229
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impo...

result:

ok 100000 lines

Test #10:

score: 0
Accepted
time: 146ms
memory: 8620kb

input:

100000 99999
39660 9302 1000000
98071 2713 1000000
72323 3720 1000000
71796 8998 1000000
40049 3610 1000000
8898 4563 791922
22165 8348 1000000
50925 2575 1000000
83758 7014 1000000
73270 8365 1000000
8646 7417 769494
9949 8258 885461
93723 6162 1000000
10594 6944 942866
23413 1759 1000000
80951 492...

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
499...

result:

ok 100000 lines

Test #11:

score: 0
Accepted
time: 146ms
memory: 8656kb

input:

100000 99999
24455 6930 1000000
15633 9343 1000000
23527 1314 1000000
81866 1685 1000000
68810 6056 1000000
80851 3281 1000000
21278 2071 1000000
22597 5806 1000000
62066 8104 1000000
89599 1569 1000000
24495 2016 1000000
97826 3342 1000000
15282 575 1000000
45817 7247 1000000
75986 435 1000000
6882...

output:

impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
impossible
499837192
impossible
impossible
impossible
499837192
impossible
499837192
impossible
impossible
impossible
impossible
impossible
impossible
impossible
imposs...

result:

ok 100000 lines

Test #12:

score: -100
Wrong Answer
time: 65ms
memory: 3616kb

input:

1000 99900
760 1890 909898
887 600 231918
312 960 118146
919 2730 409324
657 1650 646029
686 1140 396945
372 810 793692
415 2580 816520
923 870 961317
438 2190 649931
667 900 456938
41 1350 216853
626 150 266679
666 2700 1503
731 3000 653691
214 240 386220
655 2280 847597
761 750 260956
515 240 9304...

output:

1: 30 800743 1830 89934
2: 30 942536 750 69928
3: 30 356574 1440 94729
4: 30 683335 1830 68659
5: 30 519048 1920 31772
6: 30 374285 2280 30980
7: 30 889785 1140 28026
8: 30 438479 30 28307
9: 30 53256 2550 69253
10: 30 850707 2400 4112
11: 30 221336 2880 65757
12: 30 539435 990 77028
13: 30 908640 7...

result:

wrong answer 1st lines differ - expected: '31860', found: '1: 30 800743 1830 89934'