码迷,mamicode.com
首页 >  
搜索关键字:hdu 1166    ( 30933个结果
HDU 多校训练赛第一场1005 Fibonacci Sum
题意: ? 给定三个数字 \(n,c,k\) ,求以下式子 ? \(\sum_{i=0}^nF(ic)^k\%(10^9+9)\) ? 其中$F(x)$为斐波那契数列第$x$项。 ? $1\leq n,c\leq10^{18},1\leq k \leq10^5$ 分析: ? 在比赛的时候我搜索了一波 ...
分类:其他好文   时间:2020-07-22 01:44:09    阅读次数:110
G - How many ways??
HDU - 2157 构造矩阵,用于转移走一步的情况。 若$i$能走到$j$,则$g[j][i]=1$,否则为$0$ 然后一开始只有$A$点累计有一种走法。 所以最后计算矩阵的$k$次方,输出$g[B][A]$即可。 #include<bits/stdc++.h> using namespace s ...
分类:其他好文   时间:2020-07-21 22:30:21    阅读次数:61
HDU 2158 最短区间版大家来找碴(尺取)
题目链接 #解题思路 题面差不多已经用的算法写到脸上了,不过有个问题就是怎么判断枚举的区间符合条件,如果直接暴力的话复杂度就要乘上q,但是如果用一个变量来计数的话,就能让时间复杂度降下来。 #代码 const int maxn = 1e5+10; int n,m,a[maxn],cnt[maxn]; ...
分类:其他好文   时间:2020-07-21 13:37:33    阅读次数:60
while(~scanf("%d", &n)) 和 while(scanf("%d", &n), n) 有啥不同
额............我也不知道(先记下) printf("%d\n", (scanf("%d", &n), n)) printf("%d\n", (~scanf("%d", &n))); 打印结果都相同........ 测试题目连接:http://acm.hdu.edu.cn/showprob ...
分类:其他好文   时间:2020-07-21 10:04:39    阅读次数:80
hdu6725(树形dp,区间选值,点权差最大)
题:http://acm.hdu.edu.cn/showproblem.php?pid=6725 分析:给节点选值肯定是选边界值。假设由节点是选中间值,那么肯定有比它选值更好的值,所以把选的可能定为2个。 #include<bits/stdc++.h> using namespace std; #d ...
分类:其他好文   时间:2020-07-20 00:01:14    阅读次数:96
hdu 4283You Are the One
The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The sho ...
分类:其他好文   时间:2020-07-18 00:42:55    阅读次数:89
HDU-3553 Just a String (二分 + 后缀数组)
题意:找出文本串中字典序第 k 大的字符串 思路: 首先我们不能仅仅按后缀数组排完序后每个字符串的大小来找,因为重复字符也参与排名,比如 AAB 2, 结果是 A 而不是 AA。 注:以下第 i 个后缀均指排完序后第 i 小的后缀。 所以我们二分找第 k 大的字符串位于哪个区间,假定我们现在确定目标 ...
分类:编程语言   时间:2020-07-17 22:05:37    阅读次数:71
HDU - 6581 Vacation (贪心+思维+物理)
Tom and Jerry are going on a vacation. They are now driving on a one-way road and several cars are in front of them. To be more specific, there are nn ...
分类:其他好文   时间:2020-07-17 09:30:42    阅读次数:82
HDU 2612 Find a way
Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a ...
分类:其他好文   时间:2020-07-17 01:14:23    阅读次数:90
HDU - 4027(线段树+剪枝)
一个数最多能取8-9次根号。 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long long ll; const int MAXN=1e5+10; const ll M ...
分类:其他好文   时间:2020-07-16 10:11:53    阅读次数:74
30933条   上一页 1 ... 9 10 11 12 13 ... 3094 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!