ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1195. Ouths and Crosses

My algo may seem interesting to you
Posted by melkiy 19 Mar 2009 07:36
No recursion or brute force would needed, if you could guess some regularity. Of course this requires some thoughts from you ;)

My main() contains only these lines but input:

if(canWinNow('X') > 0 || existsMagicCell('X')) CROSSESWIN
else if(canWinNow('O') > 1) OUTHSWIN
else DRAW

What canWinNow() does you may guess yourself, and existsMagicCell() contains about 10 lines and is not recursive.

Who wants to find out my algo write a-zakh [at] yandex.ru