QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#351023#5472. Secure the Top SecretZ_301WA 2ms12000kbC++177.4kb2024-03-11 12:18:532024-03-11 12:18:54

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3
S..
#..
U.T
7
1 2 b
1 3 b
2 2 b
2 2 r
2 3 b
3 1 r
3 2 r

output:

3

result:

ok single line: '3'

Test #2:

score: 0
Accepted
time: 2ms
memory: 11804kb

input:

2 2
ST
.U
4
1 1 r
1 1 b
1 2 b
2 1 r

output:

-1

result:

ok single line: '-1'

Test #3:

score: 0
Accepted
time: 1ms
memory: 11740kb

input:

7 10
U.........
..........
###.......
..........
.......###
..........
S........T
18
4 4 r
5 4 r
6 7 r
7 7 r
3 4 b
3 5 b
3 6 b
3 7 b
3 8 b
3 9 b
3 10 b
5 1 b
5 2 b
5 3 b
5 4 b
5 5 b
5 6 b
5 7 b

output:

14

result:

ok single line: '14'

Test #4:

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

input:

2 5
.T.#S
....U
10
1 3 b
1 1 r
1 1 b
2 1 r
1 2 b
1 5 b
2 2 r
1 2 r
2 3 r
2 4 r

output:

-1

result:

ok single line: '-1'

Test #5:

score: 0
Accepted
time: 1ms
memory: 11760kb

input:

5 5
U.S..
.....
.....
.....
.T...
12
2 4 b
4 1 b
2 2 r
1 5 b
2 2 b
4 3 b
5 3 r
1 2 b
3 2 r
2 1 r
3 3 r
2 4 r

output:

-1

result:

ok single line: '-1'

Test #6:

score: 0
Accepted
time: 1ms
memory: 12000kb

input:

5 4
....
...U
....
S#..
.#T.
12
3 4 b
2 1 b
4 3 r
2 2 b
4 3 b
3 3 r
2 3 r
1 1 b
2 2 r
4 4 b
3 1 b
1 3 r

output:

-1

result:

ok single line: '-1'

Test #7:

score: 0
Accepted
time: 1ms
memory: 8584kb

input:

3 3
UST
###
.#.
2
1 1 r
1 2 r

output:

-1

result:

ok single line: '-1'

Test #8:

score: 0
Accepted
time: 1ms
memory: 9332kb

input:

4 2
U.
..
.T
S.
8
1 1 b
3 1 r
4 1 r
1 1 r
2 2 b
3 2 b
3 1 b
2 1 r

output:

5

result:

ok single line: '5'

Test #9:

score: 0
Accepted
time: 1ms
memory: 8648kb

input:

2 2
S.
UT
4
1 1 b
1 2 b
2 1 r
1 1 r

output:

-1

result:

ok single line: '-1'

Test #10:

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

input:

3 4
#U.T
#...
.S#.
3
1 2 r
2 2 b
3 1 r

output:

-1

result:

ok single line: '-1'

Test #11:

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

input:

3 5
.U.S.
.#.##
#.T#.
7
1 3 r
1 2 r
1 4 r
1 1 b
1 3 b
2 3 b
3 2 r

output:

-1

result:

ok single line: '-1'

Test #12:

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

input:

4 4
.T.S
#.#.
....
U...
6
3 1 b
1 4 b
2 4 b
3 2 b
4 1 r
3 2 r

output:

-1

result:

ok single line: '-1'

Test #13:

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

input:

5 5
.##T.
##.#.
.#...
##.##
#SU..
6
2 3 b
3 3 r
4 3 b
1 5 b
3 4 r
5 4 r

output:

-1

result:

ok single line: '-1'

Test #14:

score: -100
Wrong Answer
time: 1ms
memory: 8316kb

input:

97 97
S...............................................................................................T
.................................................................................................
.................................................................................................
...

output:

-1

result:

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