题意: ? 给定三个数字 \(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
分析:$f[i][j][k]$表示$i到2k$行和$j到2k$列的矩阵中的最大值,可以从四个部分状态转移过来,\(f[i][j][k - 1], f[i + (1 << (k - 1))][j][k - 1]), f[i][j + (1 << (k - 1))][k - 1], f[i + (1 < ...
分类:
其他好文 时间:
2020-07-21 23:21:36
阅读次数:
75
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
题目链接 #解题思路 题面差不多已经用的算法写到脸上了,不过有个问题就是怎么判断枚举的区间符合条件,如果直接暴力的话复杂度就要乘上q,但是如果用一个变量来计数的话,就能让时间复杂度降下来。 #代码 const int maxn = 1e5+10; int n,m,a[maxn],cnt[maxn]; ...
分类:
其他好文 时间:
2020-07-21 13:37:33
阅读次数:
60
额............我也不知道(先记下) 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
题: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
一,Spring简介: Spring是一个开源框架,它由Rod Johnson创建;它是为了解决企业应用开发的复杂性而创建的 Spring是一个轻量级的控制反转(IOC)和面向切面(AOP)的容器框架 轻量 从大小与开销两方面而言Spring都是轻量的。完整的Spring框架可以在一个大小只有1MB ...
分类:
编程语言 时间:
2020-07-19 23:20:46
阅读次数:
79
###StoerWagner算法 StoerWagner算法是一个找出无向图全局最小割的算法 \(O(n^{3})\) ###算法过程 http://blog.sina.com.cn/s/blog_700906660100v7vb.html ###原理 https://www.cnblogs.com ...
分类:
编程语言 时间:
2020-07-18 22:29:33
阅读次数:
79
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
N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it i ...
分类:
其他好文 时间:
2020-07-18 00:42:12
阅读次数:
76