QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#124704#6523. Escape PlanMaMengQiTL 2ms5736kbC++172.1kb2023-07-15 14:07:522023-07-15 14:07:54

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 5736kb

input:

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

output:

4
-1

result:

ok 2 number(s): "4 -1"

Test #2:

score: -100
Time Limit Exceeded

input:

100
100 1808 2
94 47
3 3 0 2 4 3 3 4 0 0 2 2 2 3 2 4 0 2 3 4 4 2 0 3 4 3 1 0 2 1 2 2 0 3 4 4 4 1 2 2 3 1 0 0 3 1 4 2 1 3 3 4 3 0 4 1 0 3 2 1 4 4 1 3 2 3 3 3 3 1 0 3 0 4 3 1 0 4 0 4 4 1 2 0 0 4 1 3 3 3 0 2 2 1 1 2 3 4 1 2
72 29 1138
59 78 2398
95 5 1610
32 46 4176
36 99 8143
100 69 413
61 58 1595
9 9...

output:

-1
1021
-1
6471
4908
10551
14054
-1
14781
11315
-1
11516
1487
-1
2646
3792
-1
5574
-1
3952
-1
12424
11101
2150
-1
-1
-1
2322
8657
-1
10780
-1
1779
-1
14255
6265
5176
7600
-1
-1
402
3769
-1
12599
-1
-1
-1
510
-1
-1
-1
10927
20448
-1
-1
5770
12365
270
-1
6864
8673
-1
4242
-1
-1
-1
11220
-1
-1
7720
-1
...

result: