随笔分类 -  数据结构--树状数组

摘要:Why Did the Cow Cross the Road III 题目描述 The layout of Farmer John's farm is quite peculiar, with a large circular road running around the perimeter of 阅读全文
posted @ 2017-07-29 10:16 贱人方 阅读(349) 评论(0) 推荐(0)
摘要:Cards Sorting time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Cards Sorting time limit pe 阅读全文
posted @ 2017-07-22 09:56 贱人方 阅读(229) 评论(0) 推荐(0)
摘要:Necklace frog has \(n\) gems arranged in a cycle, whose beautifulness are \(a_1, a_2, \dots, a_n\). She would like to remove some gems to make them in 阅读全文
posted @ 2017-05-05 20:30 贱人方 阅读(408) 评论(0) 推荐(0)
摘要:I. Beautiful Array 2017- BUPT Collegiate Programming Contest - sync I. Beautiful Array 2017- BUPT Collegiate Programming Contest - sync 时间限制 1000 ms 内 阅读全文
posted @ 2017-04-30 10:50 贱人方 阅读(569) 评论(0) 推荐(0)
摘要:H. Black-white Tree 2017- BUPT Collegiate Programming Contest - sync H. Black-white Tree 2017- BUPT Collegiate Programming Contest - sync 时间限制 1000 ms 阅读全文
posted @ 2017-04-30 10:43 贱人方 阅读(283) 评论(0) 推荐(0)
摘要:F. Gabriel's Pocket Money 2017- BUPT Collegiate Programming Contest - sync F. Gabriel's Pocket Money 2017- BUPT Collegiate Programming Contest - sync 阅读全文
posted @ 2017-04-30 10:37 贱人方 阅读(315) 评论(0) 推荐(0)
摘要:Counting Intersections Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1138 Accepted Submission( 阅读全文
posted @ 2017-04-29 10:27 贱人方 阅读(247) 评论(0) 推荐(0)
摘要:Problem 2245 动态树 Accept: 17 Submit: 82Time Limit: 3000 mSec Memory Limit : 65536 KB Accept: 17 Submit: 82Time Limit: 3000 mSec Memory Limit : 65536 KB 阅读全文
posted @ 2017-04-21 13:41 贱人方 阅读(585) 评论(0) 推荐(0)
摘要:题目链接:http://oj.xjtuacm.com/problem/14/【分析】二元的逆序对应该都会求,可以用树状数组。这个题要求K元,我们可以看成二元的。我们先从后往前求二元逆序对数, 然后对于每一个数就可以求出在这个数后面的比他小的数的数量。然后我们再加一元时,当前扫到a[i],那么在树状数 阅读全文
posted @ 2017-04-14 18:05 贱人方 阅读(405) 评论(0) 推荐(0)
摘要:E. Anton and Permutation time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Anton likes per 阅读全文
posted @ 2017-03-17 21:53 贱人方 阅读(622) 评论(0) 推荐(1)
摘要:The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest num 阅读全文
posted @ 2017-02-07 21:17 贱人方 阅读(336) 评论(1) 推荐(0)
摘要:M × N Puzzle Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 4112 Accepted: 1140 Description The Eight Puzzle, among other sliding-tile pu 阅读全文
posted @ 2016-11-22 23:18 贱人方 阅读(609) 评论(0) 推荐(0)
摘要:Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 44309 Accepted: 19236 Description Astronomers often examine star maps where stars are 阅读全文
posted @ 2016-11-22 21:08 贱人方 阅读(237) 评论(0) 推荐(0)
摘要:Apple Tree Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 27470 Accepted: 8140 Description There is an apple tree outside of kaka's house. 阅读全文
posted @ 2016-11-22 20:06 贱人方 阅读(221) 评论(0) 推荐(0)
摘要:Cows Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 17626 Accepted: 5940 Description Farmer John's cows have discovered that the clover gr 阅读全文
posted @ 2016-11-22 12:11 贱人方 阅读(247) 评论(0) 推荐(0)
摘要:Japan Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26544 Accepted: 7206 Description Japan plans to welcome the ACM ICPC World Finals and 阅读全文
posted @ 2016-11-16 21:01 贱人方 阅读(208) 评论(0) 推荐(0)
摘要:MooFest Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 7077 Accepted: 3181 Description Every year, Farmer John's N (1 <= N <= 20,000) cows 阅读全文
posted @ 2016-11-15 23:43 贱人方 阅读(781) 评论(0) 推荐(0)
摘要:Ping pong Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3139 Accepted: 1157 Description N(3<=N<=20000) ping pong players live along a wes 阅读全文
posted @ 2016-11-15 20:55 贱人方 阅读(212) 评论(0) 推荐(0)
摘要:Mobile phones Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 18608 Accepted: 8621 Description Suppose that the fourth generation mobile ph 阅读全文
posted @ 2016-11-15 17:50 贱人方 阅读(271) 评论(0) 推荐(0)