POJ -1573 Robot Motion

2015-07-24 05:54:47 · 作者: · 浏览: 6

题目链接:POJ 1573 Robot Motion

\
一个小模拟,很简单,按照提示一步步走就是了
#include 
  
   
#include 
   
     #include 
    
      #include 
     
       #include 
      
        using namespace std; int n = 0,m = 0,st = 0; int map[10][20],dis[10][20];; bool vis[10][20]; int mv[4][2] = {{0,-1},{-1,0},{1,0},{0,1}}; void Xiao_MoNi(int w) { memset(vis,0,sizeof(vis)); int x = 0,y = w, x0 , y0; int step = 0; while(x>=0 && x
       
        =0 && y
        
         =0 && x
         
          =0 && y