QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#36189#4197. Natural NavigationGuanYunchangWA 871ms153724kbC++173.7kb2022-06-25 03:00:132022-06-25 03:00:13

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3568kb

input:

4 6 2
1 2 6
1 1
1 3 3
1 2
2 3 5
1 2
2 4 8
1 1
3 1 4
2 1 2
3 4 3
1 1

output:

14

result:

ok single line: '14'

Test #2:

score: 0
Accepted
time: 2ms
memory: 3692kb

input:

3 4 3
1 2 300
2 1 2
2 1 2000
2 3 1
1 3 80
2 2 1
2 2 42
1 2

output:

impossible

result:

ok single line: 'impossible'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3564kb

input:

3 2 3
1 2 1
3 1 2 3
1 3 1
2 1 2

output:

impossible

result:

ok single line: 'impossible'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3568kb

input:

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

output:

impossible

result:

ok single line: 'impossible'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3568kb

input:

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

output:

4

result:

ok single line: '4'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

10 12 3
4 4 5
1 1
1 7 5
1 1
1 2 5
1 1
8 4 2
1 1
8 10 5
1 1
6 8 2
1 2
6 5 1
1 2
6 10 7
1 3
5 5 8
1 2
7 1 5
1 1
2 1 6
1 1
2 8 1
1 1

output:

impossible

result:

ok single line: 'impossible'

Test #7:

score: 0
Accepted
time: 2ms
memory: 3644kb

input:

10 19 3
2 2 5
1 2
2 9 4
1 1
2 10 7
1 3
2 4 4
1 3
3 1 9
1 3
5 3 3
1 1
9 3 5
1 2
9 5 10
1 1
9 9 8
1 1
9 6 3
1 3
8 3 6
2 1 3
10 8 8
1 3
10 1 4
1 1
1 9 5
1 1
4 2 2
1 3
4 3 3
1 1
6 9 4
1 2
6 8 4
1 2
6 4 8
1 3

output:

impossible

result:

ok single line: 'impossible'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3576kb

input:

10 40 3
4 4 3
2 2 3
4 6 1
1 3
4 10 4
1 2
4 2 4
1 2
4 7 5
2 1 3
6 8 2
2 1 2
6 10 7
1 3
6 2 5
2 2 3
8 10 7
1 3
8 1 10
1 2
9 8 1
1 1
9 10 7
1 1
9 2 10
2 2 3
9 5 9
1 1
10 4 1
1 3
10 6 5
1 1
10 9 10
1 1
10 2 5
1 2
10 1 4
1 2
10 7 9
1 1
2 6 6
1 2
2 8 3
1 3
2 9 8
1 2
2 2 4
2 1 2
2 5 8
1 2
2 7 3
1 1
5 2 1
1...

output:

39

result:

ok single line: '39'

Test #9:

score: 0
Accepted
time: 871ms
memory: 153724kb

input:

10000 498740 1000
7756 7812 146482
1 738
7756 4571 581789
1 497
7756 1367 703256
1 674
7756 8199 491446
1 238
7756 6114 941752
1 26
7756 8739 775363
1 30
7756 2619 313750
1 327
7756 7187 113027
1 268
7756 6943 91064
1 366
7756 4027 565567
1 863
7756 5210 613674
1 45
7756 2625 693644
1 468
7756 5013 ...

output:

172783

result:

ok single line: '172783'

Test #10:

score: 0
Accepted
time: 720ms
memory: 132776kb

input:

1000 393460 1000
423 423 637689
1 427
423 726 460151
1 920
423 311 685370
1 597
423 412 701330
1 553
423 330 717005
1 862
423 676 524095
2 366 411
423 216 69984
1 299
423 272 363386
1 763
423 652 926886
1 928
423 357 607150
1 347
423 927 534335
1 315
423 545 655568
2 267 828
423 842 602690
1 865
423...

output:

33452

result:

ok single line: '33452'

Test #11:

score: 0
Accepted
time: 291ms
memory: 50220kb

input:

2000 484362 2
1289 135 761615
1 2
1289 1163 944919
1 2
1289 507 138396
1 2
1289 1879 154507
1 2
1289 1934 484632
1 2
1289 1049 913244
1 2
1289 626 900547
1 1
1289 1183 718783
1 1
1289 648 250102
1 2
1289 64 202751
1 2
1289 364 916080
1 1
1289 1970 703438
1 2
1289 382 559816
1 1
1289 1232 544698
1 2
...

output:

impossible

result:

ok single line: 'impossible'

Test #12:

score: 0
Accepted
time: 278ms
memory: 49184kb

input:

1000 421412 3
296 81 449614
1 3
296 636 731202
1 3
296 149 645560
1 2
296 560 570799
1 2
296 92 483079
1 3
296 83 65086
1 2
296 239 502528
1 3
296 692 952771
1 1
296 387 27706
1 3
296 489 203962
1 1
296 583 276352
1 3
296 968 443564
2 1 3
296 68 859602
1 2
296 432 245638
1 2
296 294 933292
1 3
296 2...

output:

impossible

result:

ok single line: 'impossible'

Test #13:

score: 0
Accepted
time: 270ms
memory: 48580kb

input:

1000 413799 4
570 396 203345
1 3
570 801 3447
2 2 4
570 393 825231
1 2
570 161 433365
1 4
570 44 855873
1 1
570 127 873092
1 1
570 781 749825
1 3
570 897 334612
1 1
570 953 166340
1 3
570 922 865765
3 1 2 3
570 259 949726
1 2
570 932 770327
1 1
570 640 140986
2 1 4
570 871 92089
1 2
570 326 262958
1...

output:

impossible

result:

ok single line: 'impossible'

Test #14:

score: -100
Wrong Answer
time: 573ms
memory: 78468kb

input:

25000 250000 6
17414 524 2552
2 1 5
6925 13350 4266
2 1 5
21567 1185 10194
2 5 6
6852 11401 5660
2 1 2
4925 10674 1
2 3 6
17895 7429 1
2 4 5
10990 5624 1
2 5 6
17763 9586 4510
2 2 4
3807 23200 1
2 3 6
16899 3423 17559
2 2 3
65 20870 9386
2 1 5
19750 16854 9277
2 2 3
5144 12747 1473
2 2 6
10320 1974 ...

output:

25000

result:

wrong answer 1st lines differ - expected: '25003', found: '25000'