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
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
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
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
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
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
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
树状数组,插点问段 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
//对于数列中的一个数,在它前面比它大的一定要和它交换
//在它后面比它小的一定得和它交换
//可以用树状数组存入每一个数在它之前比它小的数的个数
//那么(i-1)-total[i]为在它前面比它大的数的个数
//然后在所有数都存入树状数组后用getsum(num[i])可以求出整个数列中比这个数小的数的个数
//那么getsum(num[i])-1-total[i]则为在它之后比它小...
分类:
编程语言 时间:
2015-03-06 20:47:31
阅读次数:
160
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