2016年7月30日

HDU - 5775 Bubble Sort(树状数组)

摘要: Bubble Sort Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 659 Accepted Submission(s): 393 Prob 阅读全文

posted @ 2016-07-30 09:07 Jstyle 阅读(159) 评论(0) 推荐(0)

HDU - 1556 Color the ball(树状数组 or 线段树)

摘要: Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 16484 Accepted Submission(s): 820 阅读全文

posted @ 2016-07-30 08:53 Jstyle 阅读(212) 评论(0) 推荐(0)

树状数组

摘要: 对于普通数组,其修改的时间复杂度位O(1),而求数组中某一段的数值和的时间复杂度为O(n),因此对于n的值过大的情况,普通数组的时间复杂度我们是接受不了的。 在此,我们引入了树状数组的数据结构,它能在O(logn)内对数组的值进行修改和查询某一段数值的和。 树状数组是一个查询和修改复杂度都为log( 阅读全文

posted @ 2016-07-30 08:41 Jstyle 阅读(187) 评论(0) 推荐(0)

HDU - 1541 Stars(树状数组)

摘要: 同学们~ Stars Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordi 阅读全文

posted @ 2016-07-30 08:35 Jstyle 阅读(179) 评论(0) 推荐(0)

导航