摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 100005char a[maxn], b[maxn];int main(){ //freopen("t.txt", "r", stdin); int lena, lenb; while (scanf("%s%s", a, b) != EOF) { len 阅读全文
posted @ 2011-06-07 21:41
undefined2024
阅读(183)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>using namespace std;#define maxn 55struct Peanut{ int x, y, num;}peanut[maxn * maxn];int n, m, t, pcount;bool operator < (const Peanut & 阅读全文
posted @ 2011-06-07 18:17
undefined2024
阅读(237)
评论(0)
推荐(0)
摘要:
简单题,但double的精度在单位转换除以3.6的时候居然会不够。所以应该不进行单位换算,在算时间时乘以3.6即可。View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>#include <cmath>using namespace std;#define maxn 10005struct Rider{ double s; int t;}rider[maxn];int n, 阅读全文
posted @ 2011-06-07 17:59
undefined2024
阅读(493)
评论(0)
推荐(0)
摘要:
简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <queue>using namespace std;struct XPoint{ int x, y; int step;} s, e;#define maxn 306int n;bool vis[maxn][maxn];int dir[8][2] ={{ 1, 2 },{ 2, 1 },{ -1, 2 },{ -2, 1 },{ -1, -2 }, 阅读全文
posted @ 2011-06-07 17:40
undefined2024
阅读(288)
评论(0)
推荐(0)
摘要:
简单题,但题意不容易理解,是求出现频度第二多的数字。wa的原因是开始给vis数组初始话为0,而有些就该是0,却当成了没被赋值的用。View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;#define maxn 10008struct XPlayer{ int id, p;} xplayer[maxn * 500];int m, n;int vis[ 阅读全文
posted @ 2011-06-07 10:07
undefined2024
阅读(334)
评论(0)
推荐(0)