摘要: 转眼令人期盼又不安的省赛已经过去快半个月了,这是我第一次参加省赛,所在的队伍是Partner,很遗憾没有拿到奖牌,但是此行还是学习到很多。 省赛前一晚可能是因为有些许兴奋的关系,迟迟不能入睡,翻来覆去很久也无济于事,一个晚上没有怎么休息好。拖着一直疲惫的身躯第二天早上准时到了集合点,上了巴士以后却再也兴奋不起来,靠在床边补了一小会儿睡眠就来到了浙大紫金港校区。下车后换上参赛服,挂上参赛证,接下来是一个不算长的开幕式。这一切对于老队员来说,可能再熟悉不过了,而对于我,这一切是全新的。 过后便进入机房经行环境测试,云泽兄卡在了最后一题上,一晃测试时间已过,机房内的参赛队伍一个个地离开,执着... 阅读全文
posted @ 2013-05-22 01:25 Yogurt Shen 阅读(262) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3468 #include<cstdio>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define LL long longusing namespace std;const int maxn=100001;LL sum[maxn<<2],tmp[maxn<<2];void pushu... 阅读全文
posted @ 2012-10-30 21:42 Yogurt Shen 阅读(181) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2299 #include<stdio.h>int a[500002],left[250001],right[250001];__int64 count;void merge(int a[],int l,int m,int r){ int i,j,k,n1,n2; n1=m-l+1; n2=r-m; for(i=0... 阅读全文
posted @ 2012-10-18 14:32 Yogurt Shen 阅读(174) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1363 #include<cstdio>#include<stack>using namespace std;int a[1000];int main(void){ int n; while(scanf("%d",&n),n) { int x,t; stack<int> q; ... 阅读全文
posted @ 2012-10-08 20:18 Yogurt Shen 阅读(150) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1731 #include<cstdio>#include<cstring>#include<algorithm>using namespace std;int main(void){ char str[202]; while(gets(str)) { int n=strlen(str); s... 阅读全文
posted @ 2012-10-08 20:06 Yogurt Shen 阅读(156) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1256 #include<cstdio>#include<cstring>#include<cctype>#include<algorithm>using namespace std;char str[20];bool cmp(char a,char b){ if(tolower(a)==tolower(b)) r... 阅读全文
posted @ 2012-10-08 19:59 Yogurt Shen 阅读(212) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2503 #include<iostream>#include<string>#include<map>using namespace std;map<string,string> rule;int main(void){ int cur,len; string s,s1,s2; while(getline(cin,s)... 阅读全文
posted @ 2012-10-08 19:45 Yogurt Shen 阅读(121) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1068#include<iostream>#include<string>#include<stack>using namespace std;int main(void){ int n,m,k,p,leftpa; stack<int>s; string::iterator it; cin>>n; while(n--) { leftpa=0; cin>>m; string str; while(m--) { c... 阅读全文
posted @ 2012-10-05 15:30 Yogurt Shen 阅读(163) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2688 #include<iostream>#include<cstring>using namespace std;#define ll __int64#define maxn 10001int a[3000001],n,m;ll c[maxn];int lowbit(int x) { retur... 阅读全文
posted @ 2012-09-15 17:33 Yogurt Shen 阅读(191) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1011 #include<iostream>#include<cstring>#include<algorithm>using namespace std;int p[65],vis[65],s,j,n;bool cmp(int a,int b){ return a>b;}int dfs(int sum,int k,int ... 阅读全文
posted @ 2012-09-12 19:42 Yogurt Shen 阅读(160) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1833 自己先按着书上的思路写的,结果TLE我勒个去。。。 TLE代码: #include<cstdio>#include<algorithm>using namespace std;int main(void){ int num[1024],m,n,i,j,k,un,_min,temp,t,flag; scanf("%... 阅读全文
posted @ 2012-09-11 23:42 Yogurt Shen 阅读(171) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4278 竟然是八进制转十进制- -,网络赛第一题。 #include<stdio.h>#include<string.h>int base[58];char num[8];void init(){ base['0']=0; base['1']=1; base['2']=2; ba... 阅读全文
posted @ 2012-09-10 22:03 Yogurt Shen 阅读(201) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1698 #include<cstdio>#include<algorithm>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;const int maxn=111111;int h,w,n,col[maxn<<2],s... 阅读全文
posted @ 2012-08-31 11:07 Yogurt Shen 阅读(160) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4027 #include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define maxn 100001using namespace... 阅读全文
posted @ 2012-08-31 11:05 Yogurt Shen 阅读(132) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2852 #include<cstdio>#include<cstring>#include<algorithm>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define maxn 100010using namespace std;int sum[ma... 阅读全文
posted @ 2012-08-31 11:03 Yogurt Shen 阅读(138) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2182 #include<stdio.h>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define maxn 8080int tree[maxn<<2],d1[maxn],ans[maxn];void build(int l,int r,int rt){ tree[rt]=r-... 阅读全文
posted @ 2012-08-31 11:01 Yogurt Shen 阅读(184) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1556 #include<cstdio>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1#define MAX 100001int tree[MAX<<2];; void build(int l,int r,int rt){ tree[rt]=0; ... 阅读全文
posted @ 2012-08-31 11:00 Yogurt Shen 阅读(159) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2828 #include<stdio.h>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn=200001;int pos[maxn],val[maxn],ans[maxn],em[maxn<<2],index;void build(int l,int r,int... 阅读全文
posted @ 2012-08-31 10:58 Yogurt Shen 阅读(175) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2795 #include<cstdio>#include<algorithm>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;const int maxn=222222;int h,w,n,MAX[maxn<<2];v... 阅读全文
posted @ 2012-08-31 10:56 Yogurt Shen 阅读(166) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1394 #include<cstdio>#include<algorithm>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;const int maxn=5555;int sum[maxn<<2],x[maxn];v... 阅读全文
posted @ 2012-08-31 10:53 Yogurt Shen 阅读(253) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1754 #include<cstdio>#include<algorithm>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1using namespace std;const int maxn=222222;int MAX[maxn<<2];void Pu... 阅读全文
posted @ 2012-08-31 10:51 Yogurt Shen 阅读(220) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1166 线段树第一题 #include<cstdio>#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn=55555;int sum[maxn<<2];void PushUP(int rt) { sum[rt]=sum[rt... 阅读全文
posted @ 2012-08-31 10:49 Yogurt Shen 阅读(255) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio>#include<cstring>#include<algorithm>using namespace std;int dp[1010],a[1010];int main(void){ int n,m,i,j,k,Max; while(scanf("%d",&n),n) { Max=0; for(i=1;i<=n;... 阅读全文
posted @ 2012-08-31 10:43 Yogurt Shen 阅读(156) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1561 #include<cstdio>#include<cstring>#include<algorithm>using namespace std;int n,m,num[250],map[250][250],dp[250][250],vis[250];void dfs(int p){ int ... 阅读全文
posted @ 2012-08-31 10:42 Yogurt Shen 阅读(194) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1787 #include<stdio.h>#include<string.h>int C[4],ans[30],p[10010],vis[10010],dp[10010],T[4]={1,5,10,25};int main(void){ int m,i,j,sum; while(scanf("%d",&m)!=EOF) ... 阅读全文
posted @ 2012-08-31 10:39 Yogurt Shen 阅读(315) 评论(0) 推荐(0) 编辑
摘要: http://acmpj.zstu.edu.cn/JudgeOnline/showproblem?problem_id=3286 #include<cstdio>#include<cstring>#include<algorithm>#define INF 1<<29using namespace std; int dp[51][100003],c[11],v[11],n,w,p,m,i,... 阅读全文
posted @ 2012-08-31 10:36 Yogurt Shen 阅读(223) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1742 #include<stdio.h>#include<string.h>int dp[100010],C[110],A[110],vis[100010];int main(void){ int n,m,i,j,ans; while(scanf("%d%d",&n,&m),n||m) { for(i=... 阅读全文
posted @ 2012-08-31 10:32 Yogurt Shen 阅读(114) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3260 #include<cstdio>#include<cstring>#include<algorithm>#define INF 1<<29using namespace std;int T,N,V[1001],C[1001],buy[40000],sell[40000],i,j,k,maxv,ans;int main(void)... 阅读全文
posted @ 2012-08-31 10:26 Yogurt Shen 阅读(219) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2063 #include<cstdio>#include<algorithm>using namespace std;int dp[1000000],w[11],v[11],sum,n,y;int main(void){ int t,i,j,V; scanf("%d",&t); while(t--) { ... 阅读全文
posted @ 2012-08-31 10:23 Yogurt Shen 阅读(106) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1252 #include<cstdio>#include<algorithm>using namespace std;const int INF=20000000;const int MAXV=100*100+100+1;int f[MAXV],a[6],t,i,j,maxV,tot,_max;float ave;int main(vo... 阅读全文
posted @ 2012-08-31 10:20 Yogurt Shen 阅读(247) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1114 #include<cstdio>#include<cstring>#include<algorithm>#define INF 1000000000using namespace std;int dp[20000],P[1000],W[1000],E,F,N,M;int main(void){ ... 阅读全文
posted @ 2012-08-31 10:10 Yogurt Shen 阅读(154) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3535 #include<cstdio>#include<cstring>#include<algorithm>using namespace std;int dp[110][110],c[110],g[110],n,T,i,j,k,m,s;void case0(){ for(j=0;j<=T;j+... 阅读全文
posted @ 2012-08-31 10:07 Yogurt Shen 阅读(226) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1712 #include<cstdio>#include<algorithm>#define maxn 111using namespace std;int dp[maxn],a[maxn][maxn],i,j,k,n,m;int main(void){ while(scanf("%d%d",&n,... 阅读全文
posted @ 2012-08-31 10:05 Yogurt Shen 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3033#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int brand[124],price[124],value[124],dp[15][100024];int main(void){ int N,K,M,i,j,k; while(scanf("%d%d%d",&N,&M,&K)!=EOF) { for(i=0;i<N;i++ 阅读全文
posted @ 2012-08-31 10:01 Yogurt Shen 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1948 #include<cstdio>#include<cmath>#include<algorithm>using namespace std;int l[44],dp[888][888];int area(int x,int y,int z){ double p=(x+y+z)/2.0; return (int)(sq... 阅读全文
posted @ 2012-08-31 09:59 Yogurt Shen 阅读(94) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2955#include<cstdio>#include<cstring>#include<algorithm>using namespace std;double q[105],dp[10005];int m[105];int main(void){ int t,n,i,j,sum; double p; scanf("%d",&t) ; while(t--) { scanf("%lf%d",&p,&n); su 阅读全文
posted @ 2012-08-31 09:57 Yogurt Shen 阅读(127) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1203 #include<cstdio>#include<algorithm>using namespace std;double dp[10005];int main(void){ int n,m,ai,i,j; double bi; while(scanf("%d%d",&n,&m)... 阅读全文
posted @ 2012-08-31 09:55 Yogurt Shen 阅读(118) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1837 #include<stdio.h>#include<string.h>int dp[21][15001],c[21],g[21];int main(void){ int C,G,i,j,k; scanf("%d %d",&C,&G); for(i=0;i<C;i++) scanf("%d",&c[... 阅读全文
posted @ 2012-08-31 09:52 Yogurt Shen 阅读(134) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3628 #include<cstdio>using namespace std;const int mm=20000000;bool dp[mm];int h[22],i,j,k,n,b,m;int main(void){ while(scanf("%d%d",&n,&b)!=EOF) { m=0; ... 阅读全文
posted @ 2012-08-31 09:50 Yogurt Shen 阅读(120) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3624 背包第一题 #include<cstdio>#include<cstring>#include<algorithm>#define maxn 30000using namespace std;int weight[maxn],val[maxn],dp[maxn],N,M,i,j;int main(void){ while... 阅读全文
posted @ 2012-08-31 09:47 Yogurt Shen 阅读(134) 评论(0) 推荐(0) 编辑