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 |
关于顺逆时针贴墙走。。设左上右下为 0, 1, 2, 3 顺时针时,假设当前的前进方向为d, 那么从(d+2)%4,也就是相反方向开始循环,每次 (d+1)%4,遇到第一个能走的就前进。 逆时针时同理,不同的是每次(d-1+4)%4. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator