摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 10000int k, m;bool sel[maxn];void input(){ scanf("%d", &m); memset(sel, 0, sizeof(sel)); for (int i = 0; i < k; i++) { int a; scanf("%d& 阅读全文
posted @ 2011-08-02 21:18
undefined2024
阅读(207)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 15char map[maxn][maxn];char st[maxn];int ans[maxn][maxn];int n, m;void input(){ scanf("%d%d", &n, &m); for (int i = 0; i < n; i++) scanf( 阅读全文
posted @ 2011-08-02 14:11
undefined2024
阅读(305)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 105int n, p;int f[maxn];bool hard[maxn];int point[maxn];int main(){ //freopen("t.txt", "r", stdin); scanf("%d%d", &n, &p 阅读全文
posted @ 2011-08-02 13:55
undefined2024
阅读(280)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int cal(int h, int m, int s){ return h * 3600 + m * 60 + s;}int main(){ //freopen("t.txt", "r", stdin); int h, m, s; double speed = 0; double ans = 0; 阅读全文
posted @ 2011-08-02 13:38
undefined2024
阅读(174)
评论(0)
推荐(0)
摘要:
题意:一个国际象棋棋盘(8×8),从中挖掉两个格子,问能否用31张1×2的卡片恰好盖住剩余的格子。分析:本来想二分图匹配,后来发现别人说有简便方法。就是把棋盘染色成国际象棋黑白相间的棋盘,如果两个格子同色则不可,否则可以。如果两个都为黑色,那么棋盘上剩余的白色就比黑色多,每个卡片只要放在棋盘上,必然覆盖一个白色和一个黑色。所以此情况不可以。白色同理。至于别的情况为什么可以,很难证明,但可以大概想象出来。View Code #include <iostream>#include <cstdio>#include <cstdlib>#incl 阅读全文
posted @ 2011-08-02 13:07
undefined2024
阅读(174)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;#define pi acos(-1)struct Point{ double x, y;}first, now, last;int n;double r;double dist(Point &a, Point &b){ Point p; p.x = a.x - b.x; p.y 阅读全文
posted @ 2011-08-02 12:46
undefined2024
阅读(296)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 10005int a, b, n;double p[maxn], sum[maxn];int dblcmp(double a, double b){ if (a < b) return -1; return 1;}int main(){ //freopen("t.txt", "r 阅读全文
posted @ 2011-08-02 12:36
undefined2024
阅读(409)
评论(0)
推荐(0)