shyyhs
shyyhs
全部文章
题解
DP专题(52)
图论(4)
多校补题(2)
数据结构(27)
数论(4)
日记(14)
未归档(38)
归档
标签
去牛客网
登录
/
注册
shyyhs的博客
全部文章
/ 题解
(共329篇)
acwing 199题解
来自专栏
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n,k,ans,l,r; cin>>n>>k; ans=n*k; ...
数学
2020-06-12
2
701
acwing 198题解
来自专栏
这是ac代码: #include <bits/stdc++.h> using namespace std; typedef long long ll; ll n; ll a[]={2,3,5,7,11,13,17,19,23}; ll cnt[12]; ll vt=-1,vts=2e9;...
思维
2020-06-11
2
634
acwing 197题解
来自专栏
#include <bits/stdc++.h> using namespace std; const int N=1e6+5; int prime[N],st[N],cnt=0; int sum[N]; void init() { for(int i=2;i<=N-5;i...
数学
2020-06-11
1
593
acwing 196题解
来自专栏
代码如下: #include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll const int N=1e6+3e5,M=1e5; ll st[N],prime[N],cnt=0,pos,...
2020-06-11
1
808
算乘方的牛--距离***搜索还有3题
来自专栏
题解在b站,id:shyyhsac #include <bits/stdc++.h> using namespace std; int n; bool dfs(int x,int y,int dep)//假设第一个工作变量大于第二个工作变量. { if(dep==0) retur...
IDA*
2020-06-09
2
655
立体推箱子2--距离***搜索还有四题
来自专栏
闲谈:这个题目该怎么写呢?我们很容易知道2次使得横坐标移动3格/纵坐标移动3格为最佳对吧.我们首先分析下小的格子,先从1-1开始?那就只有一组解对吧,2-2也是一样的吧,都是只有在终点的地方有解对吧.3-3呢?合法位子必定有解.哈哈哈,看错题目了,题目说是无限空间,那么思路还是一样的啦,那么题目就成...
BFS
2020-06-09
2
730
天气预报--距离***搜索还有5题
来自专栏
录了个视频,累死爸爸了QAQhttps://www.bilibili.com/video/BV1XC4y1h7s9/可能是去学校的最后一次了把.
BFS
2020-06-08
3
613
字串变换--距离***搜索结束还有6题
来自专栏
闲谈:emm,明天开始就要自闭了,今天的题水的一批,自己还水了那么久的群,以及水了一个考试,还看cyq直播,真的shabi...双向bfs往往比单向bfs更优,至于为什么?自己画个图就懂了?下面讲讲这个题怎么做?双向bfs两个点,起点和终点.然后进行枚举每个变换..最后有交接就是答案了.代码:(建议...
双向BFS
2020-06-08
1
769
乳草的入侵--距离***搜索还有7题
来自专栏
简单是简单,就是输入贼(t+m%s%%b%)+/+..大家做的时候小心点就好,还有这样例是神仙!代码如下: #include <bits/stdc++.h> using namespace std; typedef pair<int,int> pi; const int N=...
BFS
2020-06-07
0
655
武士风度的牛--距离***搜索还有8题
来自专栏
闲谈:这题太***了,我就不解释了.先试了发迭代加深,主要是测试自己会搜不,我也知道会t..)这是迭代加深的代码: #include <bits//stdc++.h> using namespace std; typedef pair<int,int> pi; const i...
BFS
2020-06-07
0
977
首页
上一页
24
25
26
27
28
29
30
31
32
33
下一页
末页