QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#197314#7502. Painting the RoadswaifuSenpaiRE 1ms4000kbC++172.9kb2023-10-02 14:31:042023-10-02 14:31:04

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

3
9
21
-1
42

result:

ok 5 number(s): "3 9 21 -1 42"

Test #2:

score: -100
Runtime Error

input:

1000
5 5
1 2 4 1
2 3 9 0
3 4 10 1
3 5 8 1
1 5 2 5 1
5 3
1 2 7 1
1 3 7 0
2 4 9 0
3 5 4 1
3 4 3
5 3
1 2 7 1
2 3 1 0
1 4 7 1
4 5 5 1
4 4 3
5 1
1 2 3 1
1 3 6 0
2 4 10 0
2 5 7 0
1
5 3
1 2 10 1
1 3 10 0
1 4 1 1
3 5 4 0
2 5 2
5 5
1 2 7 0
1 3 5 0
2 4 8 1
2 5 10 0
2 2 3 5 4
5 4
1 2 6 1
1 3 4 0
3 4 4 0
1 5 5 ...

output:


result: