上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 182 下一页
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 100int map[maxn][maxn];int ans, ansx, ansy;void input(){ memset(map, 0, sizeof(map)); for (int i = 1; i < 20; i++) for (int j = 1; j < 20; j++) scanf(&q 阅读全文
posted @ 2011-07-31 21:22 undefined2024 阅读(202) 评论(0) 推荐(0)
摘要: 在使用printf时,%后面跟-号表示左对齐,否则右对齐。%后跟0表示用0补齐,否则表示用空格补齐,%后跟数字表示对齐宽度。例如:%-05s,表示宽度为5右对齐输出s,左面空余区域用0补齐。简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;#define maxn 25#define maxl 15#define maxp 15struc 阅读全文
posted @ 2011-07-31 20:15 undefined2024 阅读(163) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int m;void input(){ int now = m; int d = 0; int nowd = 0; int maxnow = 0; int x, y; while (scanf("%d%d", &x, &y), !(x == -1 && y == -1)) if (now 阅读全文
posted @ 2011-07-31 16:40 undefined2024 阅读(157) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 1000000int n;int vis[maxn];int main(){ //freopen("t.txt", "r", stdin); scanf("%d", &n); memset(vis, -1, sizeof(vis)); int i 阅读全文
posted @ 2011-07-31 16:23 undefined2024 阅读(148) 评论(0) 推荐(0)
摘要: 位操作简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 50000int ak[maxn], bk[maxn], b[maxn], k[maxn];char st[maxn];int n;int value(char ch){ return ch >= '0' && ch <= '9' ? ch - &# 阅读全文
posted @ 2011-07-31 16:03 undefined2024 阅读(254) 评论(0) 推荐(0)
上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 182 下一页