夜语声烦-
夜语声烦-
全部文章
题解
归档
标签
去牛客网
登录
/
注册
夜语声烦-的博客
全部文章
/ 题解
(共33篇)
题解 | #小G有一个大树#
#include <iostream> #include <cstring> using namespace std; const int N = 1010; int n; int h[N], e[N], ne[N], idx; int si[N];//每个节点对应的...
C++
2023-03-05
0
309
题解 | #寻找道路#
#include <iostream> #include <cstring> #include <queue> using namespace std; const int N = 10010, M = 2e5 + 10; int n, m, s, t; i...
2023-02-26
0
385
题解 | #[HNOI2015]菜肴制作#
#include <iostream> #include <cstring> #include <queue> #include <vector> using namespace std; const int N = 1e5 + 10; int ...
2023-02-06
0
453
题解 | #矩阵 A×B#
矩阵快速幂模板题 #include <iostream> using namespace std; const int N = 110; int n, m, p; int a[N][N], b[N][N], c[N][N]; int main() { cin >&g...
C++
2022-10-27
0
427
题解 | #Fibonacci 第 n 项#
思路: 由于数据范围过大,所以递推已经无法满足要求,尝试将递推式的运算转换为矩阵的运算 用 fif_ifi 来表示斐波那契数列的第 iii 项 递推式:fi=1×fi−1+1×fi−2f_i = 1\times f_{i-1} + 1 \times f_{i-2}fi=1×fi−1+1×fi−...
C++
2022-10-27
1
316
题解 | #[SCOI2010]序列操作#
没有思路直接上代码 #include <iostream> #include <cstdio> #define lson u << 1 #define rson u << 1 | 1 using namespace std; const int ...
C++
2022-10-09
1
366
题解 | #Mr. Young's Picture Permutations#
Mr. Young's Picture Permutations #include <iostream> #include <cstring> using namespace std; const int N = 31; typedef long long LL; in...
C++
2022-09-22
0
431
题解 | #牛牛的最美味和最不美味的零食#
牛牛的最美味和最不美味的零食 #include <iostream> using namespace std; const int N = 1e6 + 10, INF = 0x3f3f3f3f; int n, m, a[N]; struct Node { int l, r; i...
C++
2022-08-24
1
341
题解 | #区间和#
区间和 结构体 #include <iostream> using namespace std; const int N = 1e6 + 10; typedef long long LL; struct Node { int l, r; LL sum; }tr[N ...
C++
2022-08-07
0
420
题解 | #[ZJOI2007]矩阵游戏#
[ZJOI2007]矩阵游戏 #include <iostream> #include <cstring> using namespace std; const int N = 210; int n; bool g[N][N], st[N]; int match[N];...
C++
2022-08-01
0
364
首页
上一页
1
2
3
4
下一页
末页