摘要: 又是被自己的方向搞混了题意:走出去和遇到之前走过的就输出。#include #include #includeusing namespace std;#define N 110int 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,nint setdire(char s){ switch(s){ case 'E':return 0; case 'S':return 1; case 'W':return 2; ca 阅读全文
posted @ 2013-07-24 22:01 Teemo的技术blog 阅读(107) 评论(0) 推荐(0)
摘要: 做的差点想吐,调来调去,编译器都犯毛病,wlgq,幸好1a。题意:给你机器人怎走的路线,碰撞就输出#include #include #include#include#define N 110using namespace std;struct Rob{ int x,y,dire;//dire 1为e,2为s,3为w,4为n}rob[N];int n,m,a,b,map[N][N];int setdire(char s){ switch(s){ case 'E':return 1; case 'S':return 2; case 'W':retu 阅读全文
posted @ 2013-07-24 18:09 Teemo的技术blog 阅读(99) 评论(0) 推荐(0)