cf/mirror

One-Four Overload

CF
1567F2700· international gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
5 5
.....
.XXX.
.X.X.
.XXX.
.....
Output
YES
4 1 4 4 1
4 5 5 5 1
4 5 1 5 4
1 5 5 5 4
1 4 4 1 4
Sample 2of 4
Input
5 5
.....
.XXX.
.XXX.
.XXX.
.....
Output
NO
Sample 3of 4
Input
3 2
..
..
..
Output
YES
4 1
4 1
1 4
Sample 4of 4
Input
9 9
.........
.XXXXX.X.
.X...X...
.X.XXXXX.
.X.X.X.X.
.X.XXX.X.
.X.....X.
.XXXXXXX.
.........
Output
YES
4 4 4 1 4 1 4 1 4
1 5 5 5 5 5 4 10 1
4 5 1 4 1 5 4 4 4
4 5 1 5 5 0 5 5 1
4 5 1 5 4 5 1 5 4
4 5 1 5 5 5 4 5 1
1 5 4 4 1 1 4 5 1
4 5 5 5 5 5 5 5 4
1 1 1 1 4 4 1 1 4
1567F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…