- 博客(7)
- 收藏
- 关注
转载 树状数组
树状数组 树状数组是一个查询和修改复杂度都为log(n)的数据结构,假设数组a[1..n], 那么查询a[1]+...+a的时间是log级别的,而且是一个在线的数据结构, 支持随时修改某个元素的值,复杂度也为log级别。 来观察这个图: 令这棵树的结点编号为C1,C2...Cn。令每个结点的值为这棵树的值的总和,那么容易发现: C1 = A
2008-12-30 17:42:00 857
原创 FOJ 1675 The Seventy-seven Problem
The Seventy-seven Problem Time Limit:2sMemory limit:32MAccepted Submit:20Total Submit:36 One day, daxia writes a big number N that can be divided by seventy-seven on the paper
2008-12-23 17:31:00 742 3
原创 FOJ月赛-2008年12月 题解
Addr:http://acm.fzu.edu.cn/list.php?volume=71672~1679AMinimum Adjacent Value题目的意思很简单,就是给一群数,叫你求出其中不同的2个数的差的绝对值的最小值.不过由于一开始题目的描述出了点问题,sample出现了很可怕的错误,所以一开始AC率非常低,改完题目以后被无数人秒掉了这题的考点是排序.级别:水题Btypedef lon
2008-12-22 14:20:00 1172
原创 FZU 1603 Checkers II
Checkers II Time Limit:5sMemory limit:32MAccepted Submit:41Total Submit:184 It is easy for us to solve "Checkers" using the formula . Now the problem has a little changed .
2008-12-12 15:24:00 633 3
原创 PKU 3432 Count Squares
Count SquaresTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 1331Accepted: 552DescriptionGiven a set of points with integer coordinates xi, yi, i = 1...N, your program must find all the squ
2008-12-09 14:01:00 607
原创 PKU 2785 4 Values whose Sum is 0
4 Values whose Sum is 0Time Limit: 15000MSMemory Limit: 228000KTotal Submissions: 6014Accepted: 1456Case Time Limit: 5000MSDescriptionTheSUM problem can be formulated as follows: given four lists
2008-12-04 20:25:00 984 1
原创 PKU 1840 Eqs
EqsTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 1818Accepted: 712DescriptionConsider equations having the following form:a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0The coefficients are given
2008-12-03 19:58:00 830
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人