AND20211201
AND20211201
全部文章
题解
dfs(1)
总结(28)
数据结构(1)
未归档(1)
洛谷(1)
归档
标签
去牛客网
登录
/
注册
AND20211201的博客
全部文章
/ 题解
(共113篇)
1212. 地宫取宝
#include<iostream> using namespace std; int f[55][55][13][14],w[55][55];//f[i][j][x][y]表示的是在(i,j)点拿x件物品最大价值为y的方案数。 int MOD=&...
2022-02-16
1
294
895. 最长上升子序列
#include<iostream> using namespace std; const int N=1010; int a[N],f[N],ans=0,j; int main() { &n...
2022-02-13
0
279
AcWing 1015. 摘花生
#include<iostream> using namespace std; const int N=110; int f[N][N],a[N][N]; int main() {  ...
2022-02-12
1
283
蚂蚁感冒
这题主要是将题目中容易迷惑的条件转化为易于做题的条件,题中说当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行,可以转化为两只蚂蚁相遇后继续沿原方向前进。 这样就很容易得出,当第一只蚂蚁向右运动时,所有在它右边向左运动的蚂蚁都会感冒,并且在第一只蚂蚁后面向右运动的蚂蚁也会感冒。 同理,当第...
2022-02-09
1
302
AcWing 1205. 买不到的数目
如果不知道公式的话,可以用打表的方法来找一下规律。 打表代码: #include<iostream> using namespace std; bool dfs(int i,int n,int m) { &...
2022-02-09
0
289
费解的开关
#include<iostream> #include<cstring> using namespace std; const int N=6; char g[N][N],h[N][N]; int dx[5]&nbs...
2022-02-05
0
288
带分数
#include<iostream> #include<algorithm> #include<cstring> using namespace std; int m,ans; bool x[10],y[10]; bo...
2022-02-03
0
338
递归实现组合型枚举
#include<iostream> using namespace std; int n,m; const int N=26; int w[N]; void dfs(int u,int&nbs...
2022-02-02
0
229
递归实现排列型枚举
#include<iostream> using namespace std; const int N=10; int a[N]; bool b[N];//0表示该数没有用过,1表示该数已经用过了 int m; voi...
C++
2022-02-01
1
342
单链表
#include<iostream> using namespace std; const int N = 100010; int ne[N], e[N];// ne[]存储的是指针,&...
2022-01-30
2
323
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页