#define ONLINE_JUDGE #include<cstdio> #include <cstring> #include <algorithm> using namespace std; int A,B,sx,sy; char maz[101][101]; int vis[101][101]; const int dx[4]={0,1,0,-1}; const int dy[4]={-1,0,1,0}; int dir(char ch){ if(ch=='N'…
题目代号:POJ 1573 题目链接:http://poj.org/problem?id=1573 Language: Default Robot Motion Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 14195 Accepted: 6827 Description A robot has been programmed to follow the instructions in its path. Instr…
Robot Motion Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12856 Accepted: 6240 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…
Robot Motion Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12978 Accepted: 6290 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…
http://poj.org/problem?id=2632 #include<cstdio> #include <cstring> #include <algorithm> using namespace std; int A,B,n,m; int robot[101][3]; char rbuff[10]; int dir[255]; const int dx[4]={0,1,0,-1}; const int dy[4]={1,0,-1,0}; int action…
又是被自己的方向搞混了 题意:走出去和遇到之前走过的就输出. #include <cstdlib> #include <iostream> #include<cstdio> using namespace std; #define N 110 int map[N][N],visit[N][N],n,m,flag;//n为x轴 m为y轴 int dir[][2]={{0,1},{1,0},{0,-1},{-1,0}};//e,s,w,n int setdire(char…
1.Link: http://poj.org/problem?id=1573 http://bailian.openjudge.cn/practice/1573/ 2.Content: Robot Motion Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 10856 Accepted: 5260 Description A robot has been programmed to follow the instru…
Robot Motion 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…