for(;;){s=readline() for(i=0;i<7;)s=s.replace("QRRBBNN"[i++],'') print((s.length<9)*1)}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page