cf/mirror

Constrained Tree

CF
513D12400· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3 2
1 2 LEFT
1 3 RIGHT
Output
2 1 3
Sample 2of 2
Input
3 2
1 2 RIGHT
1 3 LEFT
Output
IMPOSSIBLE
513D1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…