| ||||||||||
| 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:怎么会写500行呢? 我只有110行In Reply To:怎么会写500行呢? 我只有110行 Posted by:pipilupe at 2017-07-04 08:48:28 > 我建了一个跟方向有关的数组, 感觉还能用。
>
> int dir[4] = {0,1,2,3};//north east south, west
> int stepy[4] = {0,1,0,-1};
> int stepx[4] = {-1,0,1,0};
>
> 向左走, 方向-1, 向右走, 方向+1. 范围限制在0--3.
>
> --------> y
> |
> |
> |
> X
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator