摘要:
题目链接。分析:虽说是简单的模拟,却调试了很长时间。调试这么长时间总结来的经验:1.坐标系要和题目建的一样,要不就会有各种麻烦。2.在向前移动过程中碰到其他的机器人也不行,这个题目说啦:a robot always completes its move before the next one starts moving。#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int maxn = 100 + 10;int G[maxn][maxn];int 阅读全文
posted @ 2013-06-21 20:59
Still_Raining
阅读(725)
评论(0)
推荐(0)
摘要:
题目链接。分析:最多有五个变量,所以枚举所有的真假值,从后向前借助于栈验证是否为永真式。#include <iostream>#include <cstring>#include <cstdio>#include <cstdlib>#include <stack>using namespace std;const int maxn = 10000 + 10;stack<bool> S;char s[maxn];bool hash[200], ans;void check(char pos) { if(s[pos] == & 阅读全文
posted @ 2013-06-21 10:41
Still_Raining
阅读(680)
评论(0)
推荐(0)
浙公网安备 33010602011771号