Hungry3

梦想到达塔顶的蜗牛

2013年11月15日

zoj 3429 Cube Simulation 不同层的循环是独立的,好神奇

摘要: #include#include#includeusing namespace std;const int maxn=1010;int x[maxn],y[maxn],z[maxn];int X,Y,Z;int main(){ char op[20]; int i,j,k,val,a,b,c; int x1,x2,y1,y2,z1,z2; int tx,ty,tz; while(scanf("%s",op)!=EOF) { if(op[2]=='L') { scanf("%d%d%d",&X,&Y,&Z); ... 阅读全文

posted @ 2013-11-15 23:06 Hungry3 阅读(199) 评论(0) 推荐(0)

poj 3667 Hotel 线段树+区间合并

摘要: #include#includeusing namespace std;#define lson l,m,rt=tol)return query(tol,lson); else if(sumL[rs]+sumR[ls]>=tol)return m-sumR[ls]+1; else return query(tol,rson);}int main(){ int n,m,op,tol,L,R,d; while(scanf("%d%d",&n,&m)!=EOF) { build(1,n,1); while(m--) ... 阅读全文

posted @ 2013-11-15 19:49 Hungry3 阅读(148) 评论(0) 推荐(0)

导航