QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#61662#4508. Money TransfersGuanYunchangWA 35ms18916kbC++142.1kb2022-11-14 14:55:132022-11-14 15:03:31

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

3

result:

ok single line: '3'

Test #2:

score: 0
Accepted
time: 3ms
memory: 3384kb

input:

3 3 1 2
1 2 6
1 3 2
2 3 3
2
1 2


output:

Infinity

result:

ok single line: 'Infinity'

Test #3:

score: 0
Accepted
time: 4ms
memory: 5576kb

input:

13 17 12 13
1 2 2
2 3 2
1 3 6
2 6 20
6 7 3
7 13 2
3 4 5
4 5 10
5 13 2
12 1 13
12 8 15
12 9 30
8 9 7
9 10 30
10 11 30
11 13 30
8 13 125
9
1 2 3 4 5 6 7 12 13

output:

34

result:

ok single line: '34'

Test #4:

score: 0
Accepted
time: 3ms
memory: 3412kb

input:

12 14 11 12
1 2 2
2 3 2
3 4 2
1 11 2
4 12 2
5 11 8
5 6 8
6 12 8
11 7 4
7 8 4
8 9 4
9 12 4
11 10 16
10 12 20
8
1 2 3 4 5 6 11 12

output:

11

result:

ok single line: '11'

Test #5:

score: 0
Accepted
time: 4ms
memory: 5436kb

input:

12 14 11 12
1 2 2
2 3 2
3 4 2
1 11 2
4 12 2
5 11 8
5 6 8
6 12 8
11 7 4
7 8 4
8 9 4
9 12 4
11 10 16
10 12 16
8
1 2 3 4 5 6 11 12

output:

5

result:

ok single line: '5'

Test #6:

score: 0
Accepted
time: 35ms
memory: 18856kb

input:

1000 10000 486 769
515 391 7447
15 489 5202
136 282 5519
669 468 3382
195 114 3193
744 987 6609
596 54 1139
395 884 8507
684 975 3060
109 820 8815
208 968 9077
545 578 1266
299 362 2599
317 440 5898
469 546 741
883 368 3390
448 339 8350
1000 820 9436
415 327 7589
991 358 3485
982 683 9418
317 279 43...

output:

Impossible

result:

ok single line: 'Impossible'

Test #7:

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

input:

500 10000 119 449
174 51 3173
101 289 6376
57 286 3940
432 61 8980
141 209 8869
406 125 7797
309 344 2420
500 180 7189
184 43 9958
3 236 932
270 184 4037
206 485 6939
112 473 3035
311 217 6182
167 385 4461
220 180 7639
465 125 4865
335 481 79
264 170 1583
487 145 6476
397 253 6951
405 84 934
368 28 ...

output:

Infinity

result:

ok single line: 'Infinity'

Test #8:

score: 0
Accepted
time: 17ms
memory: 11544kb

input:

500 10000 27 471
170 116 9916
32 453 7654
426 133 2825
313 26 8806
483 173 7848
213 138 8719
259 154 4969
122 379 6436
7 313 1657
154 126 6425
349 151 9729
235 339 1328
214 142 2954
165 286 4956
402 326 4900
308 410 7694
28 393 1653
377 191 388
76 259 1624
74 496 9304
367 97 2821
162 229 430
29 41 1...

output:

1079

result:

ok single line: '1079'

Test #9:

score: -100
Wrong Answer
time: 13ms
memory: 18916kb

input:

977 1005 1 2
1 3 1000000
3 4 1000000
4 5 1000000
5 6 1000000
6 7 1000000
7 8 1000000
8 9 1000000
9 10 1000000
10 11 1000000
11 12 1000000
12 13 1000000
13 14 1000000
14 15 1000000
15 16 1000000
16 17 1000000
17 18 1000000
18 19 1000000
19 20 1000000
20 2 1000000
1 21 971000
21 22 971000
22 23 971000...

output:

Infinity

result:

wrong answer 1st lines differ - expected: '391999', found: 'Infinity'