cf/mirror

The Riddle of the Sphinx

CF
1466I3400· legendary gm1s256 MB⇄ interactive

Examples

Sample 1of 3
Input
5 3
 
yes
 
no
 
no
 
no
 
no
 
yes
Output
5 101
 
5 110
 
4 100
 
3 101
 
2 001
 
1 000
 
0 110
Sample 2of 3
Input
4 3
 
no
 
no
 
no
 
no
Output
1 000
 
2 000
 
3 000
 
4 000
 
0 000
Sample 3of 3
Input
1 1
Output
0 0
1466I.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)