cf/mirror

Flag of Berland

CF
837B1600· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6 5
RRRRR
RRRRR
BBBBB
BBBBB
GGGGG
GGGGG
Output
YES
Sample 2of 4
Input
4 3
BRG
BRG
BRG
BRG
Output
YES
Sample 3of 4
Input
6 7
RRRGGGG
RRRGGGG
RRRGGGG
RRRBBBB
RRRBBBB
RRRBBBB
Output
NO
Sample 4of 4
Input
4 4
RRRR
RRRR
BBBB
GGGG
Output
NO
837B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)