AND20211201
AND20211201
全部文章
分类
dfs(1)
总结(28)
数据结构(1)
未归档(1)
洛谷(1)
题解(113)
归档
标签
去牛客网
登录
/
注册
AND20211201的博客
TA的专栏
17篇文章
0人订阅
未解决
2篇文章
297人学习
数据结构
15篇文章
377人学习
全部文章
(共149篇)
AcWing 1219. 移动距离
#include<iostream> using namespace std; int main() { int w,m,n; cin>>w...
2022-02-22
1
300
AcWing 1204. 错误票据
#include<iostream> #include<algorithm> #include<sstream> #include<string> #include<algorithm> using namespace ...
2022-02-22
1
357
K倍区间
此题难点在于如何求出每个点与点之间的距离,这个问题可以进行转化,如果(a[r]-a[l-1])%k==0,那么a[r]%k==a[l-1]%k; #include<iostream> using namespace std; const int N=100010; long long a...
2022-02-18
1
208
波动数列
#include <algorithm> using namespace std; const int N = 1010, MOD = 100000007; int f[N...
2022-02-18
1
382
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
位运算
1.求二进制中1的个数 while(n) { n&=n-1; c++;//c则为二进制中1的个数 } #include<iostream> using namespace...
2022-02-09
1
235
蚂蚁感冒
这题主要是将题目中容易迷惑的条件转化为易于做题的条件,题中说当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行,可以转化为两只蚂蚁相遇后继续沿原方向前进。 这样就很容易得出,当第一只蚂蚁向右运动时,所有在它右边向左运动的蚂蚁都会感冒,并且在第一只蚂蚁后面向右运动的蚂蚁也会感冒。 同理,当第...
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
首页
上一页
6
7
8
9
10
11
12
13
14
15
下一页
末页