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 |
1次AC了,说说如何判断。记 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 ^^ Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator