WA in CONFLIP

https://www.codechef.com/viewsolution/31340721