锘??xml version="1.0" encoding="utf-8" standalone="yes"?>九九久久自然熟的香蕉图片,久久久久亚洲AV综合波多野结衣,色欲久久久天天天综合网精品http://www.shnenglu.com/huicpc0860/category/13815.htmlEverything has its history.zh-cnWed, 21 Jul 2010 20:32:45 GMTWed, 21 Jul 2010 20:32:45 GMT60bupt 1849 Counting Sequenceshttp://www.shnenglu.com/huicpc0860/archive/2010/07/16/120571.htmlhuicpc0860huicpc0860Fri, 16 Jul 2010 10:06:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/07/16/120571.htmlhttp://www.shnenglu.com/huicpc0860/comments/120571.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/07/16/120571.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/120571.htmlhttp://www.shnenglu.com/huicpc0860/services/trackbacks/120571.html#include <stdio.h>
#include 
<algorithm>
#include 
<string.h>
using namespace std;
struct point{
    
int x,y;
}
p[100010];
int c[100010],n,d,a[100010],map[100010],t;
bool cmp(point p0,point p1){
    
return p0.x<p1.x;
}

int lowbit(int x){
    
return x&(-x);
}

int sum(int x){
    
int s=0;
    
while(x){
        s
=(s+c[x])%9901;
        x
-=lowbit(x);
    }

    
return s;
}

int update(int x,int y){
    
while(x<=n){
        c[x]
=(c[x]+y)%9901;
        x
+=lowbit(x);
    }

}

int find(int x,bool y){
    
int l=1,r=n,m,ans=-1;
    
if(y){
        
while(l<=r){
            m
=(l+r)>>1;
            
if(p[m].x>=x){
                ans
=m;
                r
=m-1;
            }

            
else l=m+1;
        }

    }
else{
        
while(l<=r){
            m
=(l+r)>>1;
            
if(p[m].x<=x){
                ans
=m;
                l
=m+1;
            }

            
else r=m-1;
        }

    }

    
return ans;
}

int main(){
    
while(scanf("%d%d",&n,&d)!=EOF){
        memset(c,
0,sizeof(c[0])*(n+1));
        
for(int i=1;i<=n;i++){
            scanf(
"%d",&a[i]);
            p[i].x
=a[i];
            p[i].y
=i;
        }

        sort(p
+1,p+n+1,cmp);
        
for(int i=1;i<=n;i++)map[p[i].y]=i;
        
for(int i=1;i<=n;i++){
            
int l=find(a[i]-d,1),r=find(a[i]+d,0);
            
if(l+1&&r+1&&l<=r){
                t
=(9901+sum(r)-sum(l-1)+1)%9901;//+1宸у涔嬪錛岀敤浜庢爣璁版槸鍚﹁鏇存柊錛岀瓟妗堝啀鍑忓幓n鍗沖彲 
                update(map[i],t);
            }

        }

        printf(
"%d\n",(9901*20+sum(n)-n)%9901);
    }

    
return 0;
}



huicpc0860 2010-07-16 18:06 鍙戣〃璇勮
]]>
poj 2155 Matrixhttp://www.shnenglu.com/huicpc0860/archive/2010/07/14/120317.htmlhuicpc0860huicpc0860Wed, 14 Jul 2010 04:47:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/07/14/120317.htmlhttp://www.shnenglu.com/huicpc0860/comments/120317.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/07/14/120317.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/120317.htmlhttp://www.shnenglu.com/huicpc0860/services/trackbacks/120317.html#include <stdio.h>
#include 
<stdlib.h>
#include 
<string.h>
#define lowbit(x) (x&(-x))
bool c[1010][1010];
int n;
bool sum(int x,int y){
    
bool s=0;
    
while(x){
        
int yy=y;
        
while(yy){
            s
^=c[x][yy];
            yy
-=lowbit(yy);
        }

        x
-=lowbit(x);
    }

    
return s;
}

void update(int x,int y){
    
while(x<=n){
        
int yy=y;
        
while(yy<=n){
            c[x][yy]
=!c[x][yy];
            yy
+=lowbit(yy);
        }

        x
+=lowbit(x);
    }

}

int main(){
    
int t,x,y,xx,yy,m;
    
char s[2];
    scanf(
"%d",&t);
    
while(t--){
        memset(c,
0,sizeof(c));
        scanf(
"%d%d",&n,&m);
        
while(m--){
            scanf(
"%s",s);
            
if(s[0]=='C'){
                scanf(
"%d%d%d%d",&x,&y,&xx,&yy);
                update(
++xx,++yy);
                update(x,yy);
                update(xx,y);
                update(x,y);
            }
else{
                scanf(
"%d%d",&x,&y);
                printf(
"%d\n",sum(x,y));
            }

        }

        puts(
"");
    }

    
return 0;
}



huicpc0860 2010-07-14 12:47 鍙戣〃璇勮
]]>
whu 1071 Joseph problemhttp://www.shnenglu.com/huicpc0860/archive/2010/05/19/115823.htmlhuicpc0860huicpc0860Wed, 19 May 2010 09:59:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/05/19/115823.htmlhttp://www.shnenglu.com/huicpc0860/comments/115823.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/05/19/115823.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/115823.htmlhttp://www.shnenglu.com/huicpc0860/services/trackbacks/115823.html#include <stdio.h>

struct xx {
    
int l, r, m, c;
}
 t[9000000];
int n, m, i;

void make(int l, int r, int i) {
    t[i].l 
= l, t[i].r = r, t[i].m = (l + r) >> 1, t[i].c = r - l;
    
if (l + 1 != r) {
        make(l, t[i].m, i 
<< 1);
        make(t[i].m, r, (i 
<< 1+ 1);
    }

}


int update(int l, int r, int i) {
    
if (t[i].l == l && t[i].r == r) return t[i].c;
    
if (r <= t[i].m) return update(l, r, i << 1);
    
if (l >= t[i].m) return update(l, r, (i << 1+ 1);
    
return update(l, t[i].m, i << 1+ update(t[i].m, r, (i << 1+ 1);
}


int find(int k, int i) {
    t[i].c
--;
    
if (t[i].l == t[i].m) {
        printf(
"%d ", t[i].l);
        
return t[i].l;
    }

    
int s = t[i << 1].c;
    
if (k <= s) return find(k, i << 1);
    
return find(k - s, (i << 1+ 1);
}


int main() {
    
while (scanf("%d%d"&n, &m) != EOF) {
        make(
1, n + 11), i = 0;
        
while (i = update(1, find((i + m) % t[1].c ? (i + m) % t[1].c : t[1].c, 1+ 11), t[1].c);
        printf(
"\n");
    }

    
return 0;
}



huicpc0860 2010-05-19 17:59 鍙戣〃璇勮
]]>
poj 1988 Cube Stackinghttp://www.shnenglu.com/huicpc0860/archive/2010/05/15/115470.htmlhuicpc0860huicpc0860Sat, 15 May 2010 13:18:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/05/15/115470.htmlhttp://www.shnenglu.com/huicpc0860/comments/115470.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/05/15/115470.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/115470.htmlhttp://www.shnenglu.com/huicpc0860/services/trackbacks/115470.html 1 #include <stdio.h>
 2 int r[30010= {0}, p[30010], n, x, y, d[30010];
 3 char s[3];
 4 
 5 int find(int x) {
 6     if (x != p[x]) {
 7         int t = p[x];
 8         p[x] = find(p[x]);
 9         r[x] += r[t];
10     }
11     return p[x];
12 }
13 
14 int main() {
15     for (int i = 1; i < 30010; i++)p[i] = i, d[i] = 1;
16     scanf("%d"&n);
17     while (n--) {
18         scanf("%s%d", s, &x);
19         if (s[0== 'M') {
20             scanf("%d"&y);
21             x = find(x), y = find(y);
22             p[x] = y;
23             r[x] = d[y];
24             d[y] += d[x];
25         } else {
26             find(x);
27             printf("%d\n", r[x]);
28         }
29     }
30     return 0;
31 }


huicpc0860 2010-05-15 21:18 鍙戣〃璇勮
]]>
一本色道久久综合狠狠躁| 91精品国产综合久久香蕉| 国产精品乱码久久久久久软件| 亚洲午夜福利精品久久| 亚洲午夜久久久久妓女影院| .精品久久久麻豆国产精品| 久久免费大片| av色综合久久天堂av色综合在| 久久av无码专区亚洲av桃花岛| 日本欧美久久久久免费播放网| 国产V综合V亚洲欧美久久| 久久精品一区二区影院| 99久久这里只有精品| 久久精品国产精品亜洲毛片| 久久99久久99精品免视看动漫| 亚洲精品国产第一综合99久久| 久久亚洲国产中v天仙www| 免费精品国产日韩热久久| 91精品国产综合久久婷婷| 久久久久久伊人高潮影院| 成人国内精品久久久久影院VR| 天天爽天天狠久久久综合麻豆| 久久久久女教师免费一区| 国产69精品久久久久777| 久久久久波多野结衣高潮| 久久亚洲精品无码播放| 亚洲国产精品久久| 精品一区二区久久久久久久网站| 久久综合噜噜激激的五月天| 久久久精品久久久久影院| 久久一区二区三区免费| 看全色黄大色大片免费久久久| 久久久99精品一区二区| 国产午夜电影久久| 国产三级精品久久| 国产精品无码久久四虎| 国产精品熟女福利久久AV| 精品久久久久久无码中文字幕| 国产成人99久久亚洲综合精品| 99久久精品国产综合一区| 国内精品久久久久久久coent |