Aimee 矩阵加速递推的模板了。 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #define int long long #define ll long long using names ...
分类:
其他好文 时间:
2021-02-22 12:24:51
阅读次数:
0
正题 题目链接:http://www.51nod.com/Challenge/Problem.html#problemId=1600 题目大意 给出一个字符串$s$,每次在最后插入一个字符后求它的所有分别子串构出的$fail$树的深度和。 \(1\leq Q\leq 10^5\) 解题思路 考虑两个 ...
分类:
其他好文 时间:
2021-02-22 11:51:13
阅读次数:
0
正题 题目链接:http://172.17.55.160/problem/652 题目大意 定义一个元素为一个有序集合包含两个元素$C={A,B}$ 集合$C={A,B}$的大小以$A$为第一关键字,$B$为第二关键字比较大小。 开始有两个元素$S={S,S},T={T,T}$且$S<T$。 然后$ ...
分类:
其他好文 时间:
2021-02-20 12:31:33
阅读次数:
0
Problem Description Bruce Force has had an interesting idea how to encode strings. The following is the description of how the encoding is done:Let x1 ...
分类:
其他好文 时间:
2021-02-19 13:18:41
阅读次数:
0
原题链接 考察:记忆化搜索 思路: 可用递推和记忆化搜索两种方式. 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 #include <cstdio> 5 using namespace std; 6 const ...
分类:
其他好文 时间:
2021-02-19 13:15:23
阅读次数:
0
题意 给出一个 \(N \times N\) 的矩阵 \(B\) 和一个 \(1\times N\) 的矩阵 \(C\)。 求出一个 \(1 \times N\) 的 \(01\) 矩阵 \(A\),使得 $D = (A \times B?C)×A^T$最大。 输出 \(D\)。 思路 先对式子进行 ...
分类:
其他好文 时间:
2021-02-18 13:58:55
阅读次数:
0
共轭优化 FFT,P3803 多项式乘法 NTT,P3803 多项式乘法 #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; typedef double db; #d ...
分类:
其他好文 时间:
2021-02-18 13:16:23
阅读次数:
0
题意 给定$n \times (n + 1)$的线性方程组的增广矩阵,求方程的解。 代码 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> using name ...
分类:
其他好文 时间:
2021-02-18 13:16:05
阅读次数:
0
通用 #include<iostream> #include<cstdio> #include<cstring> #include<string> #include<algorithm> #define maxn 1100 using namespace std; //dp[i][j] 表示从第i个 ...
分类:
其他好文 时间:
2021-02-18 13:00:57
阅读次数:
0
正题 题目链接:https://www.luogu.com.cn/problem/AT4995 题目大意 $n$个点的一棵树,上面有一些棋子,每次可以选择两个棋子移动到他们之间的路径上相邻的点上,求最少多少步能移动到一个点上。 \(n\in[1,2000]\) 解题思路 如果固定最终节点的话,这个节 ...
分类:
其他好文 时间:
2021-02-16 12:00:16
阅读次数:
0