锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久天天躁狠狠躁夜夜avapp,久久夜色tv网站,久久九九兔免费精品6http://www.shnenglu.com/gzwzm06/category/8826.htmlzh-cnThu, 21 May 2009 02:50:56 GMTThu, 21 May 2009 02:50:56 GMT607th GDCPC Problem H(DFS搴?+ 綰挎鏍?http://www.shnenglu.com/gzwzm06/articles/83427.html宸?/dc:creator>宸?/author>Tue, 19 May 2009 16:13:00 GMThttp://www.shnenglu.com/gzwzm06/articles/83427.htmlhttp://www.shnenglu.com/gzwzm06/comments/83427.htmlhttp://www.shnenglu.com/gzwzm06/articles/83427.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/83427.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/83427.html闃呰鍏ㄦ枃

]]>
POJ 3368 (RMQ)http://www.shnenglu.com/gzwzm06/articles/82204.html宸?/dc:creator>宸?/author>Fri, 08 May 2009 00:00:00 GMThttp://www.shnenglu.com/gzwzm06/articles/82204.htmlhttp://www.shnenglu.com/gzwzm06/comments/82204.htmlhttp://www.shnenglu.com/gzwzm06/articles/82204.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/82204.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/82204.html闃呰鍏ㄦ枃

]]>
POJ 3368 Frequent values (綰挎鏍?http://www.shnenglu.com/gzwzm06/articles/82203.html宸?/dc:creator>宸?/author>Thu, 07 May 2009 23:59:00 GMThttp://www.shnenglu.com/gzwzm06/articles/82203.htmlhttp://www.shnenglu.com/gzwzm06/comments/82203.htmlhttp://www.shnenglu.com/gzwzm06/articles/82203.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/82203.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/82203.html闃呰鍏ㄦ枃

]]>
POJ 2060--Taxi Cab Scheme(鏈灝忚礬寰勮鐩?http://www.shnenglu.com/gzwzm06/articles/80772.html宸?/dc:creator>宸?/author>Wed, 22 Apr 2009 12:33:00 GMThttp://www.shnenglu.com/gzwzm06/articles/80772.htmlhttp://www.shnenglu.com/gzwzm06/comments/80772.htmlhttp://www.shnenglu.com/gzwzm06/articles/80772.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/80772.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/80772.html闃呰鍏ㄦ枃

]]>
Atomic Nucleus Investigation (綰挎鏍?n = 100000)http://www.shnenglu.com/gzwzm06/articles/80569.html宸?/dc:creator>宸?/author>Mon, 20 Apr 2009 13:20:00 GMThttp://www.shnenglu.com/gzwzm06/articles/80569.htmlhttp://www.shnenglu.com/gzwzm06/comments/80569.htmlhttp://www.shnenglu.com/gzwzm06/articles/80569.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/80569.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/80569.html闃呰鍏ㄦ枃

]]>
POJ 2481(鏍戠姸鏁扮粍)http://www.shnenglu.com/gzwzm06/articles/79599.html宸?/dc:creator>宸?/author>Sat, 11 Apr 2009 08:50:00 GMThttp://www.shnenglu.com/gzwzm06/articles/79599.htmlhttp://www.shnenglu.com/gzwzm06/comments/79599.htmlhttp://www.shnenglu.com/gzwzm06/articles/79599.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/79599.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/79599.html 1#include <cstdio>
 2#include <algorithm>
 3using namespace std;
 4
 5const int SIZE = 100005;
 6
 7struct RANGE
 8{
 9    int m_S, m_E;
10    int m_p;
11
12    bool operator < (const RANGE& other) const
13    {
14        if ( m_E != other.m_E )
15            return (m_E > other.m_E);
16        
17        return (m_S < other.m_S);
18    }

19}
cow[SIZE];
20
21int N, result[SIZE], C[SIZE], max_N;
22
23int LowBit( const int & k )
24{
25    return (k & (-k));
26}

27
28void Modify(int num, int value)
29{
30    while ( num <= max_N )
31    {
32        C[num] += value;
33        num += LowBit(num);
34    }

35}

36
37int GetSum(int num)
38{
39    int sum = 0;
40    while ( num > 0 )
41    {
42        sum += C[num];
43        num -= LowBit(num);
44    }

45
46    return sum;
47}

48
49void Init()
50{
51    for ( int i = 0; i <= max_N; ++i )
52    {
53        C[i] = 0;
54    }

55}

56
57int main()
58{
59    int i;
60
61//    freopen("1.txt", "r", stdin);
62    while ( scanf("%d"&N), N != 0 )
63    {
64        max_N = 0;
65        for ( i = 0; i < N; ++i )
66        {
67            scanf("%d %d"&cow[i].m_S, &cow[i].m_E);
68            cow[i].m_S++, cow[i].m_E++;
69            cow[i].m_p = i;
70
71            if ( max_N < cow[i].m_E )
72                max_N = cow[i].m_E;
73        }

74        Init();
75
76        sort(cow, cow + N);
77
78        for ( i = 0; i < N; ++i )
79        {
80            if ( i != 0 && cow[i].m_S == cow[i - 1].m_S && cow[i].m_E == cow[i - 1].m_E )
81                result[cow[i].m_p] = result[cow[i - 1].m_p];
82            else
83                result[cow[i].m_p] = GetSum( cow[i].m_S );
84
85            Modify( cow[i].m_S, 1 );
86        }

87
88        for ( i = 0; i < N - 1++i )
89            printf("%d ", result[i]);
90        printf("%d\n", result[i]);
91    }

92    return 0;
93}


]]>
POJ 2481 Cows(綰挎鏍?http://www.shnenglu.com/gzwzm06/articles/79594.html宸?/dc:creator>宸?/author>Sat, 11 Apr 2009 08:15:00 GMThttp://www.shnenglu.com/gzwzm06/articles/79594.htmlhttp://www.shnenglu.com/gzwzm06/comments/79594.htmlhttp://www.shnenglu.com/gzwzm06/articles/79594.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/79594.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/79594.html闃呰鍏ㄦ枃

]]>
POJ 3667 Hotel(妯℃嫙)http://www.shnenglu.com/gzwzm06/articles/77488.html宸?/dc:creator>宸?/author>Sun, 22 Mar 2009 07:58:00 GMThttp://www.shnenglu.com/gzwzm06/articles/77488.htmlhttp://www.shnenglu.com/gzwzm06/comments/77488.htmlhttp://www.shnenglu.com/gzwzm06/articles/77488.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/77488.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/77488.html闃呰鍏ㄦ枃

]]>
Pku 2828(綰挎鏍?http://www.shnenglu.com/gzwzm06/articles/67180.html宸?/dc:creator>宸?/author>Tue, 18 Nov 2008 02:12:00 GMThttp://www.shnenglu.com/gzwzm06/articles/67180.htmlhttp://www.shnenglu.com/gzwzm06/comments/67180.htmlhttp://www.shnenglu.com/gzwzm06/articles/67180.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/67180.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/67180.html
 1#include <cstdio>
 2
 3const int MAXN = 200100 ;
 4
 5struct NODE
 6{
 7    int start , end ;
 8    int sum ;
 9    NODE *leftc ;
10    NODE *rightc ;
11
12    void Build( const int& s, const int& e ) ;
13    void Insert( int pos ) ;
14}
 ;
15
16NODE *root , SegTree[MAXN * 2] ;
17int g_Pos , mark , array[MAXN][2] , seq[MAXN] ;
18
19void NODE::Build( const int& s, const int& e )
20{
21    int mid = ( s + e ) >> 1 ;
22    start = s , end = e ;
23    sum = mid - s + 1 ;    //璁板綍姝ょ偣宸﹁竟鏈夊灝戜釜浜?/span>
24
25    if ( s == e )
26    {
27        leftc = rightc = NULL ;
28        return ;
29    }

30
31    leftc = &SegTree[g_Pos++] ;
32    rightc = &SegTree[g_Pos++] ;    
33
34    leftc->Build( s , mid ) ;
35    rightc->Build( mid + 1 , e ) ;
36}

37
38void NODE::Insert( int pos )
39{
40    if ( start == end )
41    {
42        mark = start ; //璁板綍鏈緇堜綅緗?/span>
43        return ;
44    }

45    if ( sum < pos )    //宸﹁竟浜烘暟姣旀寚瀹氫綅緗皬錛屽垯鎻掑埌鍙沖瀛愯妭鐐?nbsp;
46    
47        pos -= sum ;
48        rightc->Insert( pos ) ;
49    }

50    else if ( sum >= pos )    //鍚﹀垯鎻掑埌宸﹀瀛愯妭鐐?/span>
51    {
52        sum-- ;        //閭d箞宸﹁竟鐨勪漢鏁扮┖浣嶅噺1
53        leftc->Insert( pos ) ;
54    }

55}

56
57void Init()
58{
59    root = &SegTree[0] ;
60    g_Pos = 1 ;
61}

62
63int main()
64{
65//    freopen("in.txt", "r", stdin) ;
66
67    int n , i ;
68
69    while ( scanf("%d"&n) != EOF )
70    {
71        Init() ;
72
73        for ( i = 0 ; i < n ; ++i )
74        {
75            scanf("%d %d"&array[i][0], &array[i][1]) ;
76        }

77
78        root->Build( 1, n ) ;
79
80        for ( i = n - 1 ; i >= 0 ; --i )
81        {
82            root->Insert( array[i][0+ 1 ) ;
83
84            seq[mark] = array[i][1] ;
85        }

86
87        for ( i = 1 ; i < n ; ++i )
88            printf("%d ", seq[i]) ;
89        printf("%d\n", seq[i]) ;
90    }

91    return 0 ;
92}


]]>
Pku 2777(綰挎鏍?http://www.shnenglu.com/gzwzm06/articles/67152.html宸?/dc:creator>宸?/author>Mon, 17 Nov 2008 14:55:00 GMThttp://www.shnenglu.com/gzwzm06/articles/67152.htmlhttp://www.shnenglu.com/gzwzm06/comments/67152.htmlhttp://www.shnenglu.com/gzwzm06/articles/67152.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/67152.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/67152.html闃呰鍏ㄦ枃

]]>
POJ 2528(紱繪暎鍖?+ 綰挎鏍?http://www.shnenglu.com/gzwzm06/articles/67071.html宸?/dc:creator>宸?/author>Sun, 16 Nov 2008 12:58:00 GMThttp://www.shnenglu.com/gzwzm06/articles/67071.htmlhttp://www.shnenglu.com/gzwzm06/comments/67071.htmlhttp://www.shnenglu.com/gzwzm06/articles/67071.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/67071.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/67071.html闃呰鍏ㄦ枃

]]>
Poj 2299--褰掑茍鎺掑簭http://www.shnenglu.com/gzwzm06/articles/66777.html宸?/dc:creator>宸?/author>Wed, 12 Nov 2008 16:37:00 GMThttp://www.shnenglu.com/gzwzm06/articles/66777.htmlhttp://www.shnenglu.com/gzwzm06/comments/66777.htmlhttp://www.shnenglu.com/gzwzm06/articles/66777.html#Feedback0http://www.shnenglu.com/gzwzm06/comments/commentRss/66777.htmlhttp://www.shnenglu.com/gzwzm06/services/trackbacks/66777.html 1 #include <stdio.h>
 2 
 3 const int MAXN = 500001 ;
 4 __int64 a[MAXN] , c[MAXN] , cnt ;
 5 
 6 void Merge( int le, int mid, int rh);
 7 
 8 void MergeSort(int le, int rh){
 9 
10     
11     if (rh>le)
12     {
13         int mid = (le+rh) >> 1;
14         MergeSort(le,mid);
15         MergeSort(mid + 1,rh);
16         Merge(le, mid, rh);
17     }
18 }
19 
20 void Merge(int le, int mid, int rh)
21 {
22         int i, j,
23         tmp = 1;
24         for (i = le, j = mid+1; i <= mid && j <= rh; ) 
25         {
26             if (a[j] < a[i])
27             {
28                 c[tmp++= a[j++];
29                 cnt += mid - i + 1;    //璁板綍閫嗗簭鏁?nbsp;   
30             }
31             else   c[tmp++= a[i++];
32         }
33        while ( j <= rh )
34                 c[tmp++= a[j++];
35        while( i <= mid )  
36                 c[tmp++= a[i++];
37 
38         for (i = le; i <= rh; ++i)
39         {
40             a[i] = c[i - le + 1];
41         }
42         
43 }  
44 
45 
46 int main()
47 {
48     int n , i ;
49 
50     while ( scanf("%d"&n) && n != 0 )
51     {
52         for ( i = 0 ; i < n ; i++ )
53         {
54             scanf("%I64d"&a[i]) ;
55         }
56         cnt = 0 ;
57         MergeSort( 0, n - 1 ) ;
58 
59         printf("%I64d\n", cnt) ;
60     }
61     return 0 ;
62 }


]]>
国产69精品久久久久久人妻精品| 亚洲国产精品无码成人片久久| 亚洲中文精品久久久久久不卡| 久久精品亚洲男人的天堂| 久久久久久a亚洲欧洲aⅴ| 久久精品国产亚洲av高清漫画| 亚洲精品tv久久久久久久久| 国产成人久久精品一区二区三区| 国内精品综合久久久40p| 亚洲va久久久噜噜噜久久| 无码人妻久久一区二区三区免费丨| 久久亚洲精品成人无码网站| 午夜精品久久久久久久| 国产成人久久AV免费| 成人妇女免费播放久久久| 久久精品九九亚洲精品天堂| 久久综合丝袜日本网| 久久久久18| 久久精品国产亚洲av麻豆蜜芽| 思思久久精品在热线热| 久久久久久久人妻无码中文字幕爆| 精品永久久福利一区二区 | 久久伊人精品青青草原高清| 9191精品国产免费久久| 亚洲国产精品一区二区三区久久| 久久91精品国产91| 久久99精品久久只有精品| 国产激情久久久久影院| 久久这里只精品99re66| aaa级精品久久久国产片| 久久综合伊人77777| 亚洲国产精品无码久久久蜜芽| 青青草国产精品久久久久| 女同久久| 伊人久久大香线蕉精品| 麻豆成人久久精品二区三区免费| 色综合色天天久久婷婷基地| 久久WWW免费人成一看片| 国产精品狼人久久久久影院| 日韩久久久久久中文人妻 | 久久不见久久见免费视频7|