摘要: 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 阅读(142) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdut.edu.cn/web/problem.php?action=showproblem&problemid=2389题意:判断表达式是否成立;精度要求非常高;代码:View Code #include <cstdio>#include <iostream>#include <cstring>#include <cstdlib>#include <algorithm>using namespace std;struct node{ char str[25]; double data;}link[55] 阅读全文
posted @ 2012-02-26 20:52 LT-blogs 阅读(186) 评论(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 阅读(160) 评论(0) 推荐(0) 编辑