码迷,mamicode.com
首页 >  
搜索关键字:sequence operation    ( 9031个结果
HDU - 3117 Fibonacci Numbers
Description The Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, except for the first two elements f0 and f1 which are respect...
分类:其他好文   时间:2014-07-31 00:08:05    阅读次数:281
hdu 4893 Wow! Such Sequence!(线段树功能:单点更新,区间更新相邻较小斐波那契数)
hdu 4893 Wow! Such Sequence!(线段树功能:单点更新,区间更新相邻较小斐波那契数)...
分类:其他好文   时间:2014-07-31 00:04:15    阅读次数:269
HDOJ 4893 Wow! Such Sequence!
题意是这样的,给定一个n个元素的数组,初始值为0,3种操作:1 k d将第k个数增加d;2 l r 询问区间l...r范围内数之和;3 l r 表示将区间l...r内的数变成离他最近的斐波那契数,要求尽量小。线段树操作题目,其中对于第三种操作用一个懒惰标记一下,表示l...r内的数是不是已经变成斐波...
分类:其他好文   时间:2014-07-30 23:31:25    阅读次数:318
UVA 11235 Frequent values(RMQ)
Frequent values          TimeLimit:3000Ms You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices...
分类:其他好文   时间:2014-07-30 20:51:23    阅读次数:507
POJ 1141 Brackets Sequence (区间DP)
Description Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, then (S) and [S] are both regular sequences....
分类:其他好文   时间:2014-07-30 20:44:34    阅读次数:267
hdu 1005 Number Sequence
这几道题倒写得很顺利,看来这几天还是有点小进步的T_T....这道题最初只是想到可能会出现循环,后来看了个博客的分析,着重有两点1、对于公式 f[n] = A * f[n-1] + B * f[n-2]; 后者只有7 * 7 = 49 种可能,为什么这么说,因为对于f[n-1] 或者 f[n-2] ...
分类:其他好文   时间:2014-07-30 20:22:44    阅读次数:221
hdu4893 Wow! Such Sequence!
线段树结点上保存一个一般的sum值,再同时保存一个fbsum,表示这个结点表示的一段数字若为斐波那契数时的和 当进行3操作时,只用将sum = fbsum即可 其他操作照常进行,只是单点更新的时候也要先向下更新 #include #include #include #include #include #include #include #include #includ...
分类:其他好文   时间:2014-07-30 17:33:24    阅读次数:153
HDU4893:Wow! Such Sequence!(线段树lazy)
Problem Description Recently, Doge got a funny birthday present from his new friend, Protein Tiger from St. Beeze College. No, not cactuses. It's a mysterious blackbox. After some research, Doge...
分类:其他好文   时间:2014-07-30 17:27:44    阅读次数:282
HDOJ 4893 Wow! Such Sequence!
Wow! Such Sequence! Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1265    Accepted Submission(s): 387 Problem Description Recent...
分类:其他好文   时间:2014-07-30 12:25:23    阅读次数:273
Ultra-QuickSort(树状数组 + 离散化)
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq...
分类:其他好文   时间:2014-07-30 12:22:33    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!