http://www.codechef.com/OCT12/problems/DRGNBOOL
this is the link to question i have been trying
and the link to my code is
http://ideone.com/mfDxI

can someone help me resolving the error