Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:怎么会写500行呢? 我只有110行

Posted by 20172639 at 2019-05-06 21:38:08 on Problem 3083
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator