Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:1次AC了,说说如何判断。In Reply To:1次AC了,说说如何判断。 Posted by:fengyu05 at 2007-05-20 16:54:47 > 记 X的数量 xs, O的数量 os。 > 满盘(xs+oy==9)为 full, X胜利为xw,O胜利为ow > > 1. xs>os+1||xs<os =>invalid > 2. xw&&ow =>invalid > 3. !xw&&!ow&&!full =>invalid //这点得注意,意思是当盘没满,但双方都没赢 > 4. ow&&xs==os+1 =>invalid //这点也要注意,意思是O胜利了,但X的数量比O多 > 5. else =>valid > > 祝大家一次AC ^^ 少考虑了种情况吧: 当xw&&xs==os 这种情况也是不可能的!! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator