QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#679966#1072. Winter Roadsyellowbird100 ✓5674ms12260kbC++145.6kb2024-10-26 19:25:032024-10-26 19:25:03

詳細信息


Pretests


Final Tests

Test #1:

score: 100
Accepted
time: 5674ms
memory: 12260kb

input:

10 14
1 2 3
2 3 5
3 4 7
4 5 1000
5 6 64
6 7 5
7 8 18
8 1 1
1 9 70
2 9 50
8 9 13
9 10 34
7 10 29
5 10 75
25
S 1 1 200
S 1 6 34
S 1 6 35
R 12 35
S 1 6 35
S 1 6 36
B 12 1
S 1 6 1
S 1 6 13
S 1 6 14
R 11 18
S 1 6 18
S 1 6 19
R 7 19
S 1 6 19
R 11 19
S 1 6 19
B 11 18
S 1 6  19
B 7 18
S 1 6 19
R 11 19
S 1 6...

output:

1
1
0
1
0
1
1
0
1
0
0
1
0
0
0
1
1
0
0
0
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
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 99155 lines