锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品成人免费网站,日韩电影久久久被窝网,激情伊人五月天久久综合http://m.shnenglu.com/gzwzm06/category/8826.htmlzh-cnThu, 21 May 2009 02:50:56 GMTThu, 21 May 2009 02:50:56 GMT60- 7th GDCPC Problem H(DFS搴?+ 綰挎鏍?http://m.shnenglu.com/gzwzm06/articles/83427.html宸?/dc:creator>宸?/author>Tue, 19 May 2009 16:13:00 GMThttp://m.shnenglu.com/gzwzm06/articles/83427.htmlhttp://m.shnenglu.com/gzwzm06/comments/83427.htmlhttp://m.shnenglu.com/gzwzm06/articles/83427.html#Feedback0http://m.shnenglu.com/gzwzm06/comments/commentRss/83427.htmlhttp://m.shnenglu.com/gzwzm06/services/trackbacks/83427.html闃呰鍏ㄦ枃

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

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

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

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

]]> - POJ 2481(鏍戠姸鏁扮粍)http://m.shnenglu.com/gzwzm06/articles/79599.html宸?/dc:creator>宸?/author>Sat, 11 Apr 2009 08:50:00 GMThttp://m.shnenglu.com/gzwzm06/articles/79599.htmlhttp://m.shnenglu.com/gzwzm06/comments/79599.htmlhttp://m.shnenglu.com/gzwzm06/articles/79599.html#Feedback0http://m.shnenglu.com/gzwzm06/comments/commentRss/79599.htmlhttp://m.shnenglu.com/gzwzm06/services/trackbacks/79599.html 1
#include <cstdio>
2
#include <algorithm>
3
using namespace std;
4
5
const int SIZE = 100005;
6
7
struct 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
21
int N, result[SIZE], C[SIZE], max_N;
22
23
int LowBit( const int & k )
24

{
25
return (k & (-k));
26
}
27
28
void Modify(int num, int value)
29

{
30
while ( num <= max_N )
31
{
32
C[num] += value;
33
num += LowBit(num);
34
}
35
}
36
37
int 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
49
void Init()
50

{
51
for ( int i = 0; i <= max_N; ++i )
52
{
53
C[i] = 0;
54
}
55
}
56
57
int 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://m.shnenglu.com/gzwzm06/articles/79594.html宸?/dc:creator>宸?/author>Sat, 11 Apr 2009 08:15:00 GMThttp://m.shnenglu.com/gzwzm06/articles/79594.htmlhttp://m.shnenglu.com/gzwzm06/comments/79594.htmlhttp://m.shnenglu.com/gzwzm06/articles/79594.html#Feedback0http://m.shnenglu.com/gzwzm06/comments/commentRss/79594.htmlhttp://m.shnenglu.com/gzwzm06/services/trackbacks/79594.html闃呰鍏ㄦ枃

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

]]> - Pku 2828(綰挎鏍?http://m.shnenglu.com/gzwzm06/articles/67180.html宸?/dc:creator>宸?/author>Tue, 18 Nov 2008 02:12:00 GMThttp://m.shnenglu.com/gzwzm06/articles/67180.htmlhttp://m.shnenglu.com/gzwzm06/comments/67180.htmlhttp://m.shnenglu.com/gzwzm06/articles/67180.html#Feedback0http://m.shnenglu.com/gzwzm06/comments/commentRss/67180.htmlhttp://m.shnenglu.com/gzwzm06/services/trackbacks/67180.html
1
#include <cstdio>
2
3
const int MAXN = 200100 ;
4
5
struct 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
16
NODE *root , SegTree[MAXN * 2] ;
17
int g_Pos , mark , array[MAXN][2] , seq[MAXN] ;
18
19
void 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
38
void 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
57
void Init()
58

{
59
root = &SegTree[0] ;
60
g_Pos = 1 ;
61
}
62
63
int 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://m.shnenglu.com/gzwzm06/articles/67152.html宸?/dc:creator>宸?/author>Mon, 17 Nov 2008 14:55:00 GMThttp://m.shnenglu.com/gzwzm06/articles/67152.htmlhttp://m.shnenglu.com/gzwzm06/comments/67152.htmlhttp://m.shnenglu.com/gzwzm06/articles/67152.html#Feedback0http://m.shnenglu.com/gzwzm06/comments/commentRss/67152.htmlhttp://m.shnenglu.com/gzwzm06/services/trackbacks/67152.html闃呰鍏ㄦ枃

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

]]> - Poj 2299--褰掑茍鎺掑簭http://m.shnenglu.com/gzwzm06/articles/66777.html宸?/dc:creator>宸?/author>Wed, 12 Nov 2008 16:37:00 GMThttp://m.shnenglu.com/gzwzm06/articles/66777.htmlhttp://m.shnenglu.com/gzwzm06/comments/66777.htmlhttp://m.shnenglu.com/gzwzm06/articles/66777.html#Feedback0http://m.shnenglu.com/gzwzm06/comments/commentRss/66777.htmlhttp://m.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 }

]]>
久久无码专区国产精品发布|
色狠狠久久AV五月综合|
青青青国产成人久久111网站|
青青草原综合久久大伊人精品|
国产一区二区精品久久凹凸|
香蕉久久AⅤ一区二区三区|
伊人久久大香线焦AV综合影院
|
久久久久久国产精品免费免费|
国产99久久久国产精品小说|
2021精品国产综合久久|
亚洲伊人久久综合影院|
91久久精品91久久性色|
亚洲国产成人精品久久久国产成人一区二区三区综
|
久久精品人人做人人爽电影蜜月|
久久免费高清视频|
一本久道久久综合狠狠爱|
97精品伊人久久久大香线蕉|
精品久久人人爽天天玩人人妻|
国产亚洲成人久久|
2021久久精品国产99国产精品|
久久99热这里只有精品66|
91久久成人免费|
精品熟女少妇av免费久久|
久久精品国产亚洲AV不卡|
欧洲性大片xxxxx久久久|
久久精品国产99国产精品澳门|
久久久久国产精品人妻|
青青草原综合久久大伊人导航|
国产精品久久久天天影视香蕉
|
亚洲天堂久久精品|
久久久无码精品亚洲日韩蜜臀浪潮
|
久久精品国产99国产精偷|
久久精品人人做人人爽电影蜜月|
久久亚洲国产成人影院|
午夜视频久久久久一区|
久久夜色撩人精品国产|
亚洲国产成人精品久久久国产成人一区二区三区综
|
久久久噜噜噜久久中文字幕色伊伊
|
亚洲国产精品久久久久婷婷老年
|
色成年激情久久综合|
欧美精品一区二区精品久久|