上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 182 下一页
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;#define maxn 10#define eps 10E-9struct Point{ double x, y;} f[maxn], g[maxn];int a, b;int dblcmp(double a, double b){ if (abs(a - b) < eps) return 阅读全文
posted @ 2011-07-31 12:30 undefined2024 阅读(166) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;#define maxn 20#define maxl 30struct Person{ int id, x;} person[maxn];char st[30];char name[maxn][maxl];int n;bool operator <(const Person &am 阅读全文
posted @ 2011-07-31 10:35 undefined2024 阅读(247) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 105int n, m, d;char map[2][maxn][maxn];int dir[4][2] ={{ 1, 0 },{ 0, 1 },{ -1, 0 },{ 0, -1 } };void input(){ scanf("%d%d%d", &n, &m, &d) 阅读全文
posted @ 2011-07-30 17:59 undefined2024 阅读(225) 评论(0) 推荐(0)
摘要: dp很复杂,具体参见黑书p257页。View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 30struct Node{ long long up, down;} g[maxn][maxn];long long n;long long c;long long ans[maxn];void getfirst(long long n, long long c, bool u){ 阅读全文
posted @ 2011-07-30 17:11 undefined2024 阅读(741) 评论(1) 推荐(0)
摘要: 简单题,推公式View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 10005int n, u, d;long long sum[maxn], f[maxn], extraup[maxn], extradown[maxn];long long down[maxn], up[maxn];void input(){ scanf("%d%d%d", & 阅读全文
posted @ 2011-07-29 21:52 undefined2024 阅读(261) 评论(0) 推荐(0)
上一页 1 ··· 95 96 97 98 99 100 101 102 103 ··· 182 下一页