cf/mirror

Two Houses

CF
1498E2200· master3.5s256 MB⇄ interactive

Examples

Sample 1of 2
Input
3
1 1 1
Yes
Output
? 1 2
! 1 2
Sample 2of 2
Input
4
1 2 0 3
No
No
No
No
No
No
Output
? 2 1
? 1 3
? 4 1
? 2 3
? 4 2
? 4 3
! 0 0
1498E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…