11 2013 档案

HDOJ1050
摘要:Moving TablesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16129Accepted Submission(s): 5542Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure.The floor has 阅读全文

posted @ 2013-11-30 22:49 forgot93 阅读(190) 评论(0) 推荐(0)

Codeforces Round #216 (Div. 2)解题报告
摘要:又范低级错误!只做了两题!一道还被HACK了,囧!A:看了很久!应该是到语文题:代码:#include#includeusingnamespacestd;intmain(){intn,m,k;cin>>n>>m>>k;inta[10000];intm1=0,m2=0;for(inti=1;i>a[i];if(a[i]==1)m1++;elsem2++;}intans=0;if(m>=m1)ans=m1+m2-m-k;else{ans=m1-m;if(kA[K];先每个都初始化为L;然后从A[1]-->A[K]递加,这里最好用除法,加法的太慢 阅读全文

posted @ 2013-11-30 09:49 forgot93 阅读(404) 评论(7) 推荐(0)

容斥定理!
摘要:练习题目:HDU 4135;http://acm.hdu.edu.cn/showproblem.php?pid=4135程序:#include#include#include#includeusingnamespacestd;vectorvt;//第一次用栈!很好用longlongn,a,b,ret;longlongque[10000];voidfx(){vt.clear();ret=n;for(inti=2;i*i1)vt.push_back(ret);}longlongAns(longlongn,longlongx)//核心:其实我以为要用麻烦的DFS,队列解决!而且很好弄{intnum= 阅读全文

posted @ 2013-11-29 22:30 forgot93 阅读(160) 评论(0) 推荐(0)

导航