随笔分类 -  模拟

题目1101:计算表达式 九度OJ
摘要:算法:1.1个栈寄存运算符,1个栈寄存操作数2.优先级用数组保存好View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<stack>#include<algorithm>using namesp 阅读全文

posted @ 2012-08-21 08:49 more think, more gains 阅读(244) 评论(0) 推荐(0)

Card
摘要:算法:暴力枚举找循环节。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;int T,N,L,R;int card[100];int pcar 阅读全文

posted @ 2012-08-09 16:54 more think, more gains 阅读(192) 评论(0) 推荐(0)

模拟题。
摘要:算法:没有什么bug.以后少用STL。。。View Code #include<stdio.h>#include<stdlib.h>#include<string.h>#include<iostream>#include<vector>#include<string>#include<math.h>#include<map>#include<set>#include<algorithm>using namespace std;map<string,int>mp;m 阅读全文

posted @ 2012-08-05 21:10 more think, more gains 阅读(189) 评论(0) 推荐(0)

POJ 2632 模拟题
摘要:模拟题,不是很恶心。算法:1.写好各种操作函数Turn_Left, Turn_Right, Forward2.处理好各种细节,我wa,主要是由机器编号求其坐标时搞错,还有Turn是没有注意次数。View Code #include<iostream>#include<string.h>#include<stdlib.h>#include<stdio.h>using namespace std;int T, A, B, N, M, maxn;int mp[110][110]; //存储机器人位置,值0表示该坐标无机器人,1表示方向E,2表示S,3表 阅读全文

posted @ 2012-07-09 21:25 more think, more gains 阅读(177) 评论(0) 推荐(0)

poj 1068 模拟题
摘要:模拟题:算法1.由输入的P-sequence构找S2.根据S求每个右括号的左匹配括号,pipei[right] = left3.根据W-sequence定义求结果View Code #include <stdio.h>#include <string.h>#include <stdlib.h>#include <iostream>#include <stack>using namespace std;int p[10000], N;char stk[100000];int pipei[10000];int pre( ){ int x 阅读全文

posted @ 2012-07-09 16:57 more think, more gains 阅读(131) 评论(0) 推荐(0)

Train Problem I hdu 1022
摘要:Train Problem ITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6948Accepted Submission(s): 2547Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because 阅读全文

posted @ 2011-08-26 10:10 more think, more gains 阅读(131) 评论(0) 推荐(0)

排名 模拟题
摘要:#include <stdio.h>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;int N, M, G;int g[20];struct node { int num[20]; char name[50]; int n; int sum;}T[1010];/*int cmp(node a, node b){ if (a.sum != b.sum ) return a.sum - b.sum; return strcmp(a.name,b 阅读全文

posted @ 2011-07-20 11:18 more think, more gains 阅读(139) 评论(0) 推荐(0)

考试排名
摘要:模拟题啊,wa了好几次,原来是没有看清题意,悲剧啊。。不过做模拟题还是有意思啊。。还有通过这道题发现自己真的不太擅长字符串处理,开始搞错了,最后为了出错,写得代码有点多。。#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>struct node { int ac; char name[40]; int sum;}T[1010];char mark1[10],mark2[10];int x;int find ( char *s ){ int i, k 阅读全文

posted @ 2011-07-20 11:10 more think, more gains 阅读(180) 评论(0) 推荐(0)

导航