cf/mirror

Red-Blue Matrix

CF
1606D2400· grandmaster4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3
5 5
1 5 8 8 7
5 2 1 4 3
1 6 9 7 5
9 3 3 3 2
1 7 9 9 8
3 3
8 9 8
1 5 3
7 5 7
2 6
3 3 3 2 2 2
1 1 1 4 4 4
Output
YES
BRBRB 1
NO
YES
RB 3
1606D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)