QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#324265#8232. Yet Another Shortest Path Queryucup-team267#WA 691ms45272kbC++142.4kb2024-02-10 17:30:102024-02-10 17:31:23

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

6 9
1 2 4
2 3 6
3 6 5
6 5 3
5 4 2
4 1 3
3 4 9
1 3 100
5 3 1
5
1 3
1 6
3 4
3 5
2 5

output:

6
8
3
1
7

result:

ok 5 number(s): "6 8 3 1 7"

Test #2:

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

input:

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

output:

3
-1
-1

result:

ok 3 number(s): "3 -1 -1"

Test #3:

score: 0
Accepted
time: 210ms
memory: 28692kb

input:

40005 79608
1 2 70031203
1 3 99924845
1 4 61645659
1 5 9324967
2 3 15761918
3 4 62534796
4 5 35260314
5 2 35948540
6 2 23727405
6 7 83302920
7 3 31010426
7 8 75060393
8 4 94275932
8 9 99663793
9 5 81701979
9 6 439297
10 6 46955645
10 11 89514237
11 7 21257310
11 12 53896253
12 8 67933315
12 13 26161...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #4:

score: 0
Accepted
time: 224ms
memory: 26920kb

input:

35479 70156
1 2 53094201
1 3 95796673
1 4 35585979
1 5 55612594
2 3 60766083
3 4 64392832
4 5 32896460
5 2 91649893
6 2 6196154
6 7 4986564
7 3 91799790
7 8 10909791
8 4 30034265
8 9 95672010
9 4 67004237
9 10 77872672
10 5 68900058
10 6 42927604
11 6 71288663
11 12 51597962
12 7 79690815
12 13 9742...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #5:

score: 0
Accepted
time: 227ms
memory: 28980kb

input:

35811 70820
1 2 40434193
1 3 13483892
1 4 32864259
1 5 47591755
1 6 65123023
1 7 81695948
1 8 1102880
1 9 47223939
1 10 52947058
1 11 31439481
2 3 94162364
3 4 20590842
4 5 24137043
5 6 74926235
6 7 9376267
7 8 97130364
8 9 75568799
9 10 5022411
10 11 59066963
11 2 96177033
12 2 17823959
12 13 83906...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #6:

score: 0
Accepted
time: 691ms
memory: 45272kb

input:

200000 599952
127401 69434 88680591
127401 39916 10673559
127401 52475 59546013
127401 77787 74018113
127401 11462 7023970
60723 37187 65141305
60723 115008 72307785
60723 71812 47362248
60723 143858 20042617
60723 153890 48502784
60723 172009 21754689
60723 23327 97998405
63817 58332 30056889
63817...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #7:

score: 0
Accepted
time: 688ms
memory: 44780kb

input:

200000 599962
127401 36130 68347938
127401 56107 50001021
127401 35011 47850437
127401 166086 58628679
127401 167575 97121890
127401 150008 97636763
127401 148173 79875436
60723 38275 3780759
60723 75775 69051390
60723 93280 43415633
60723 108525 89666833
60723 119851 80916915
60723 134418 23881201
...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #8:

score: 0
Accepted
time: 681ms
memory: 43468kb

input:

200000 599957
127401 62215 44179748
127401 96198 78839479
127401 81659 96992357
127401 105920 13674618
127401 192829 54389653
60723 66329 69331527
60723 139474 14904280
60723 186870 86233097
60723 134036 31587848
60723 161658 81495543
60723 156381 83635122
60723 187612 77920441
60723 189714 55041890...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #9:

score: 0
Accepted
time: 363ms
memory: 26856kb

input:

35011 70019
1 2 65752645
2 3 52997572
3 4 14100539
4 5 78562579
5 6 99655664
6 7 26904774
7 8 88411503
8 9 89420520
9 10 88149169
10 11 53207001
11 12 16506048
12 13 37143703
13 14 1295901
14 15 61139259
15 16 79880287
16 17 4390087
17 18 2733598
18 19 48969502
19 20 77562639
20 21 53171540
21 22 36...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #10:

score: 0
Accepted
time: 440ms
memory: 29436kb

input:

50000 99997
1 2 5460409
2 3 95815999
3 4 17091945
4 5 91580749
5 6 91717493
6 7 55420828
7 8 10603109
8 9 62048169
9 10 28446542
10 11 38346952
11 12 66167473
12 13 80749600
13 14 20348320
14 15 5868535
15 16 45627426
16 17 2445360
17 18 21766361
18 19 20516369
19 20 8226530
20 21 86609482
21 22 134...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
...

result:

ok 1000000 numbers

Test #11:

score: -100
Wrong Answer
time: 176ms
memory: 28932kb

input:

50000 99997
1 2 92917899
2 3 90125226
3 4 10806409
4 5 56452040
5 6 34960749
6 7 14085023
7 8 96350028
8 9 49181182
9 10 70920046
10 11 3727766
11 12 42039112
12 13 63921049
13 14 7634090
14 15 24597384
15 16 13087802
16 17 63136838
17 18 58806049
18 19 98769520
19 20 943620
20 21 70246129
21 22 145...

output:

53806372
101314854
162775916
124866755
96220435
134228775
87285210
112668433
132328466
160932332
116266392
101162529
162550422
93988737
88713261
88828117
72361729
54614389
95539309
119384111
117230804
126078781
60646451
142757728
111469654
40164780
106261258
108068517
15251469
173381359
68447790
832...

result:

wrong answer 3rd numbers differ - expected: '124850165', found: '162775916'