07 2012 档案

摘要:线段树。各种WA。最后过了,老泪纵横。View Code 1 #include <stdio.h> 2 #define MAXN 100001 3 int col[MAXN * 4],lazy[MAXN * 4]; 4 void update(int cur) 5 { 6 col[cur] = col[cur << 1] | col[cur << 1 | 1]; 7 } 8 9 void pushdown(int cur,int x,int y) 10 { 11 int mid = (x + y) >> 1,ls = cur << 1 阅读全文
posted @ 2012-07-15 17:19 浙西贫农 阅读(146) 评论(0) 推荐(0)
摘要:换行出错。WA了一次。。用a[i][j]表示从第i个主题上到第j个主题所需要的时间,d[i][0]表示上完第i个主题所需课时数的最小值,d[i][1]表示在上完第i个主题所需课时数最小的情况下,不满意度DI的最小值。下面贴代码:View Code 1 #include <stdio.h> 2 #include <string.h> 3 int a[1001][1001],d[1001][2],C,time; 4 int DI(int a) 5 { 6 if(a == time) 7 return 0; 8 if(time - a <= 10) 9 ... 阅读全文
posted @ 2012-07-06 10:55 浙西贫农 阅读(184) 评论(0) 推荐(0)