上一页 1 ··· 100 101 102 103 104 105 106 107 108 ··· 182 下一页
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;#define maxn 30char order[maxn];char st[maxn];int l;void work(char ch){ char x; int d; switch (ch) { case 'J': x = st[l - 1]; for (int i 阅读全文
posted @ 2011-07-23 09:41 undefined2024 阅读(176) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 1005int f[maxn];int n;bool vis[maxn];int gcd(int x, int y){ if (!x || !y) return x > y ? x : y; for (int t; t = x %y; x = y, y = t); return y;}int main(){ 阅读全文
posted @ 2011-07-23 08:46 undefined2024 阅读(207) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;#define maxn 10005bool is[maxn];int prm[maxn];int f[maxn];int getprm(int n){ int i, j, k = 0; int s, e = (int) (sqrt(0.0 + n) + 1); memset(is, 1, siz 阅读全文
posted @ 2011-07-22 20:56 undefined2024 阅读(186) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 20int f[maxn];int vis[maxn];int n;int main(){ //freopen("t.txt", "r", stdin); int t; scanf("%d", &t); while (t--) { memset(v 阅读全文
posted @ 2011-07-22 20:30 undefined2024 阅读(179) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 300int n;int f[maxn], g[maxn];void input(){ for (int i = 0; i < n; i++) scanf("%d", &f[i]);}void work(int a){ for (int i = 0; i < a; i++) 阅读全文
posted @ 2011-07-22 19:59 undefined2024 阅读(163) 评论(0) 推荐(0)
上一页 1 ··· 100 101 102 103 104 105 106 107 108 ··· 182 下一页