摘要: #include#define N 100100struct node {int x,y,yanchi;}a[N*4];//注意数组范围void build(int t,int x,int y) {a[t].x=x;a[t].y=y;a[t].yanchi=1;if(x==y)return ;int... 阅读全文
posted @ 2013-11-13 20:22 HYDhyd 阅读(138) 评论(0) 推荐(0) 编辑
摘要: #include//数据弱线段树延迟更新水过#define N 100100struct node {int x,y,yanchi,num;}a[N*4];void build(int t,int x,int y) {a[t].x=x;a[t].y=y;a[t].yanchi=0;a[t].num=... 阅读全文
posted @ 2013-11-13 19:55 HYDhyd 阅读(139) 评论(0) 推荐(0) 编辑
摘要: //用二分查找,先找到x小于等于m的有几个数这些数有可能y大于u即为符合。//然后找这些数中y小于u的即为排除//相减即可#include#include#define N 100100struct node {int x,y;}a[N],b[N];int n;int cmp1(const void... 阅读全文
posted @ 2013-11-13 19:08 HYDhyd 阅读(135) 评论(0) 推荐(0) 编辑
摘要: #include#include#define N 30int map[N][4],total;void dfs(int n,int count,int end,int path[N],int h[N]) {int i;path[count]=n;//记录for(i=0;ib) {t=a;a=b;b... 阅读全文
posted @ 2013-11-13 15:06 HYDhyd 阅读(85) 评论(0) 推荐(0) 编辑