上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 182 下一页
摘要: 简单题View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>using namespace std;#define maxn 10001bool is_self[maxn];int generate(int a){ int ret = a; while (a) { ret += a % 10; a /= 10; } return ret;}int main(){ for (int i = 1; i < maxn; i++)... 阅读全文
posted @ 2013-01-16 08:36 undefined2024 阅读(225) 评论(0) 推荐(0)
摘要: 枚举View Code #include<iostream>#include<algorithm>using namespace std;struct point{ char ss; int x, y;};struct direction{ char ul, ur, lr, ll;};direction dir[100];point p[30];int sum;int cmp(point a, point b){ if (a.x != b.x) return a.x < b.x; else return a.y < b.y;}int c... 阅读全文
posted @ 2013-01-16 08:22 undefined2024 阅读(196) 评论(0) 推荐(0)
摘要: 模拟View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 105int f[maxn][2];int n;void work(){ int page_num = (n + 3) / 4; for (int i = 0; i < page_num * 2; i++) f[i][(i & 1) ^ 1] = i + 1; int j = page_num * 2 阅读全文
posted @ 2013-01-15 19:45 undefined2024 阅读(187) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>using namespace std;#define maxn 105char st1[maxn], st2[maxn];int len;int gcd(int a, int b){ if (a == 0) return 1; b %= a; while (b) { a %= b; swap(a, b); } return a;}int cal(c... 阅读全文
posted @ 2013-01-15 19:11 undefined2024 阅读(249) 评论(0) 推荐(0)
摘要: 记忆化搜索View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 25int a, b, c;int f[maxn][maxn][maxn];int w(int a, int b, int c){ if (a <= 0 || b <= 0 || c <= 0) return 1; if (a > 20 || b > 20 || c > 20 阅读全文
posted @ 2013-01-15 18:47 undefined2024 阅读(301) 评论(0) 推荐(1)
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 182 下一页