码迷,mamicode.com
首页 >  
搜索关键字:sequence impdp    ( 6610个结果)
HDU1159-Common Subsequence
描述: A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = ...
分类:其他好文   时间:2015-08-21 23:08:07    阅读次数:160
hdu 2454 Degree Sequence of Graph G (推断简单图)
///已知各点的度,推断是否为一个简单图#include#include#includeusing namespace std;int a[1010];bool cmp(int x,int y){ return x>y;}int main(){ int t,n,i,j; scanf...
分类:其他好文   时间:2015-08-21 20:54:02    阅读次数:114
POJ 3368 Frequent values(RMQ)
Frequent values Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 15134   Accepted: 5519 Description You are given a sequence of n integers a1 , a2 , ... , an ...
分类:其他好文   时间:2015-08-21 17:12:56    阅读次数:141
Codeforces Round #259 (Div. 2) B. Little Pony and Sort by Shift
One day, Twilight Sparkle is interested in how to sort a sequence of integers a1,?a2,?...,?an in non-decreasing order. Being a young unicorn, the only operation she can perform is a unit shift. That...
分类:其他好文   时间:2015-08-20 20:53:05    阅读次数:169
HDU 1058 Humble Numbers
Humble NumbersProblem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 1...
分类:其他好文   时间:2015-08-20 13:00:27    阅读次数:184
hdu(5400)——Arithmetic Sequence(想法题)
题意: 首先,现在给出三个数字n,d1,d2。然后第二行给出n个数字。 然后题目要求的是求这个序列中有几个区间满足一下条件之一: 1)这个区间是一个等差数列,且公差为d1或d2; 2)若一个区间为[l,r],那么有l *注意,这里单个数字一定是满足等差数列的。而且这里数字最好都使用__int64来保存,因为这个原因我们队WA了好几次。 思路: 这里我设了头和尾两个指针,分别用l和r表...
分类:其他好文   时间:2015-08-20 06:48:50    阅读次数:92
hdu 5167 Fibonacci(预处理)
Problem DescriptionFollowing is the recursive definition of Fibonacci sequence:Fi=???01Fi?1+Fi?2i = 0i = 1i > 1Now we need to check whether a number c...
分类:其他好文   时间:2015-08-20 01:11:35    阅读次数:133
hdu 2817 A sequence of numbers(快速幂)
Problem DescriptionXinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric sequences. The numbers are not very ...
分类:其他好文   时间:2015-08-20 01:01:59    阅读次数:189
hdu 5400 Arithmetic Sequence
click here~~ ***Arithmetic Sequence***Problem DescriptionA sequence b1,b2,?,bn are called (d1,d2)-arithmetic sequence if and only if there exist i(1≤i≤n) such that for every j(1...
分类:其他好文   时间:2015-08-19 23:44:34    阅读次数:169
多校第九场Arithmetic Sequence题解
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5400 题意:给定等差数列的差值d1,d2,问长度为n的数列中有多少个满足条件的子序列,条件为子序列中存在一个xi满足前半段是差值为d1的等差数列,后半段是差值为d2的等差数列 思路: 首先预处理出来出ii这个位置向前d_1d?1??的等差序列和向后d_2d?2??的等差数列能延续到多长,记作...
分类:其他好文   时间:2015-08-19 20:47:04    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!