摘要: 经典的线段树的题,线段染色问题。跟“Mayor's Posters”那题差不多,只不过这题有多次查询。需要注意的是给的区间[a,b],a可能会大于b。View Code #include <stdio.h>#include <string.h>#define N 100001int n,m,k,ans;int vis[31];int color[4*N];void pushdown(int cur,int x,int y){ int ls=cur<<1,rs=cur<<1|1; if(color[cur]) { color[ls]=col 阅读全文
posted @ 2012-07-13 10:21 BeatLJ 阅读(205) 评论(0) 推荐(0) 编辑