http://acm.hdu.edu.cn/showproblem.php?pid=1035 Robot Motion Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5591 Accepted Submission(s): 2604 Problem Description A robot has been programmed t…
转载请注明出处:http://blog.csdn.net/u012860063? viewmode=contents 题目链接: HDU:pid=1035">http://acm.hdu.edu.cn/showproblem.php?pid=1035 POJ: id=1573">http://poj.org/problem? id=1573 Description A robot has been programmed to follow the instruction…
Problem Description A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N north (up the page)S south (down the page)E east…
Robot Motion Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 8180 Accepted Submission(s): 3771 Problem Description A robot has been programmed to follow the instructions in its path. Instruc…
只要根据格子的方向选择下一步搜索的方向即可,退出条件是出界或者进入环中,进入环中的条件也很好确定,就是一个点走了两次,由于路径是固定的,这就会陷入无限循环. #include<iostream> #include<cstdio> #include<cstring> #define maxn 1005 using namespace std; int n,m,c; int k; int step[maxn][maxn]; char map[maxn][maxn]; voi…