随笔分类 -  模拟

摘要:http://poj.org/problem?id=1573简单的搜索题就不说了;因为"whether or not the number before it is 1"wrong了两次;啊!!代码:View Code #include <cstdio>#include <iostream>#include <cstring>#include <algorithm>using namespace std;bool ok = 0;void print1(int n){ printf("%d step(s) to exi 阅读全文
posted @ 2012-02-26 22:14 LT-blogs 阅读(152) 评论(0) 推荐(0)
摘要:http://poj.org/problem?id=2632题意:判断机器人在行走的过程中的状况;思路:简单的模拟题,就是有点麻烦;代码:View Code #include <cstdio>#include <iostream>#include <algorithm>#include <cstdlib>#include <cstring>using namespace std;struct node{ int x; int y; int ford;}link[110];int x = 0;int y = 0;int visit[11 阅读全文
posted @ 2012-02-26 11:04 LT-blogs 阅读(163) 评论(0) 推荐(0)