夜语声烦-
夜语声烦-
全部文章
分类
题解(33)
归档
标签
去牛客网
登录
/
注册
夜语声烦-的博客
全部文章
(共36篇)
题解 | #[NOIP2013]表达式求值#
[NOIP2013]表达式求值 #include <iostream> using namespace std; int n,m,ans; char c; int main() { cin >> n; while(~scanf("%c%d",&c...
C++
2022-03-03
19
488
题解 | #[NOIP2013]记数问题#
好吧,说实话我还以为是计数类DP,没想到完全想复杂了,不过我这是万能的,可以求任意x~y直接任意z的出现次数,用前缀和就行cnt(y,z) - cnt(x-1,z) # include <iostream> # include <cmath> using namespace ...
C++
动态规划
2022-02-07
1
548
题解 | #阶乘之和#
#include<iostream> using namespace std; const int N = 1010; int a[N],res[N]; int n,s; int main() { cin >> n; res[0] = a[0] = 1; ...
C++
C
2022-01-22
0
264
题解 | #简单的烦恼#
完全背包 #include<iostream> #include<algorithm> #include<cstring> using namespace std; int t; int n,m; int a[410]; int dp[80010]; int ...
C++
动态规划
2021-12-10
1
409
题解 | #这是一道水题#
O(n)做法 数论 #include<iostream> using namespace std; int cnt[100010]; int n,k,sum,t; long long ans; int main() { cin >> n >> k; ...
C
数学
2021-12-10
0
423
题解 | #总分#
完全背包 #include<iostream> using namespace std; const int N = 1e4 + 10; int n,m; int v[N],w[N],f[N]; int main() { cin >> m >> n; ...
C++
动态规划
2021-12-08
3
359
首页
上一页
1
2
3
4
下一页
末页