QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#678371#4520. Fence / Fox and GooseyellowbirdAC ✓44ms8736kbC++144.9kb2024-10-26 14:45:092024-10-26 14:45:09

详细

Test #1:

score: 100
Accepted
time: 44ms
memory: 8736kb

input:

1 3
OXO
2 3
OXO
...
3 1
O
X
O
3 2
O.
X.
O.
6 3
O.X
OOO
O.O
OOO
OOO
OOO
7 3
..O
...
..X
...
...
...
...
6 7
..OOOOO
O..OOOO
O..OOOO
....OO.
....XOO
OOOOOOO
2 5
OOOX.
O.OOO
2 9
O..OOXOOO
OOO.OOOOO
8 1
O
.
.
X
.
.
O
O
3 6
...OO.
.XOO.O
OOO.OO
4 6
.O.OOO
OX....
OO..OO
O...OO
5 1
X
O
O
.
O
8 1
.
.
.
O
.
...

output:

-1
12
-1
12
18
4
36
14
24
-1
18
26
10
10
4
32
4
34
-1
18
14
18
40
24
-1
24
14
30
32
16
28
40
18
-1
20
8
4
12
38
6
4
30
-1
22
-1
12
28
-1
30
10
4
24
12
22
-1
36
6
-1
32
28
18
20
26
14
-1
36
20
16
14
32
22
4
30
-1
-1
14
38
-1
14
-1
26
24
22
8
-1
16
32
16
16
26
40
18
22
4
6
6
18
18
-1
16
30
30
34
30
-1...

result:

ok 114 lines