上一页 1 ··· 164 165 166 167 168 169 170 171 172 ··· 182 下一页
摘要: 模拟题,题目不难,但是在字符串处理上比较麻烦View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;#define maxn 101struct Term{ int s[maxn]; char ch[maxn];}term[maxn];string word[maxn];string st;int n, m, termnum[maxn];bool i 阅读全文
posted @ 2011-03-13 12:08 金海峰 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 简单的模拟View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;#define maxn 100string st;int n;bool left(int a){ for (int i = a - 1; i >= 0; i--) { if (st[i] == '|' || st[i] == '\\' || st[i] 阅读全文
posted @ 2011-03-13 12:06 金海峰 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 简单的模拟,字符串题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;#define maxn 100string st;char pairs[maxn][2];bool ok(char a, char b, int x){ for (int i = 0; i < x; i++) if (pairs[i][0] == a && p 阅读全文
posted @ 2011-03-13 12:05 金海峰 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 简单题,View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){ //freopen("D:\\t.txt", "r", stdin); int t, n; scanf("%d", &t); for (int i = 0; i < t; i++) { scanf("%d", &n 阅读全文
posted @ 2011-03-13 12:03 金海峰 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 简单的字符串题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){ //freopen("D:\\t.txt", "r", stdin); string st; while (getline(cin, st) && st != "#") { int sum = 0; for (int i = 0; i 阅读全文
posted @ 2011-03-13 12:03 金海峰 阅读(240) 评论(0) 推荐(0) 编辑
上一页 1 ··· 164 165 166 167 168 169 170 171 172 ··· 182 下一页