cf/mirror

String Theory

CF
269E3100· legendary gm2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 4
L T 1 3
L B 2 2
L B 3 3
T R 1 2
T B 2 1
T R 4 1
B R 4 3
Output
1 2 3
3 2 1 4
Sample 2of 2
Input
3 3
L T 1 1
T R 3 1
R B 3 3
B L 1 3
L R 2 2
T B 2 2
Output
No solution
269E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)