码迷,mamicode.com
首页 >  
搜索关键字:树状    ( 5251个结果
【POJ2155】【二维树状数组】Matrix
DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j...
分类:编程语言   时间:2015-03-07 13:40:34    阅读次数:157
【POJ1195】【二维树状数组】Mobile phones
DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The...
分类:编程语言   时间:2015-03-07 11:34:27    阅读次数:143
【HOJ2430】【贪心+树状数组】 Counting the algorithms
As most of the ACMers, wy's next target is algorithms, too. wy is clever, so he can learn most of the algorithms quickly. After a short time, he has l...
分类:编程语言   时间:2015-03-07 11:26:39    阅读次数:195
【POJ2352】【树状数组】Stars
DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level...
分类:编程语言   时间:2015-03-07 11:22:42    阅读次数:150
【POJ2266】【树状数组+离散化】Ultra-QuickSort
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping ...
分类:编程语言   时间:2015-03-07 09:03:43    阅读次数:160
POJ 1155 树状dp
TELETime Limit:1000MSMemory Limit:65536KTotal Submissions:3856Accepted:2054DescriptionA TV-network plans to broadcast an important football match. The...
分类:其他好文   时间:2015-03-06 23:39:12    阅读次数:236
HDU 2196 树状dp 求树中节点之间的最长距离
ComputerTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3749Accepted Submission(s): 1892Problem De...
分类:其他好文   时间:2015-03-06 23:30:52    阅读次数:253
Hdu1166_敌兵布阵——线段树or树状数组
树状数组,插点问段 1 #include 2 #include 3 #include 4 using namespace std; 5 const int MAXN=50000+5; 6 int c[MAXN]; 7 int lowbit(int x) 8 { 9 return x&(-x)...
分类:编程语言   时间:2015-03-06 23:26:59    阅读次数:211
hdu2838Cow Sorting树状数组求逆序对
//对于数列中的一个数,在它前面比它大的一定要和它交换 //在它后面比它小的一定得和它交换 //可以用树状数组存入每一个数在它之前比它小的数的个数 //那么(i-1)-total[i]为在它前面比它大的数的个数 //然后在所有数都存入树状数组后用getsum(num[i])可以求出整个数列中比这个数小的数的个数 //那么getsum(num[i])-1-total[i]则为在它之后比它小...
分类:编程语言   时间:2015-03-06 20:47:31    阅读次数:160
poj1947--Rebuilding Roads(树状dp)
Rebuilding Roads Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9496   Accepted: 4316 Description The cows have reconstructed Farmer John's farm, with its N b...
分类:其他好文   时间:2015-03-06 20:46:41    阅读次数:222
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!