cf/mirror

Two-Colored Dominoes

CF
1863D1400· specialist1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3
4 6
..LR..
ULRU..
DLRDUU
..LRDD
5 4
.LR.
.UU.
UDDU
D..D
LR..
2 2
..
..
Output
..WB..
WWBB..
BBWWWB
..BWBW
-1
..
..
1863D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)