咻132
咻132
全部文章
分类
题解(19)
归档
标签
去牛客网
登录
/
注册
咻132的博客
全部文章
(共19篇)
题解 | #DongDong认亲戚#
#include<bits/stdc++.h> using namespace std; int n,m; unordered_map<string,string>f;//存父节点 string find(string x){//返回x祖宗 if(f[x]!=x)f[...
并查集
2025-07-12
1
21
题解 | #几乎毁灭牛市的流星雨#
#include<bits/stdc++.h> using namespace std; const int N=310; bool s[N][N]; int m,t[N][N]; int dx[]={0,0,0,-1,1},dy[]={0,1,-1,0,0}; struct stu{ ...
广度优先搜索
2025-07-09
0
20
题解 | #马踏棋盘#
#include<bits/stdc++.h> using namespace std; const int N=20; int n,m,cnt;//n行m列别被坑了 找半天发现原来这里错了 void dfs(int a,int b){ int dx[]={1,1,2,2},dy...
C++
深度优先搜索
2025-07-05
0
17
题解 | #老子的全排列呢#
#include<bits/stdc++.h> using namespace std; const int N=10; bool s[N]; int n=8,p[N],cnt=0; void dfs(int u){ if(u==n){ for(int i=0;i...
C++
深度优先搜索
2025-07-05
0
18
题解 | #【入门班】借教室#
#include<bits/stdc++.h> using namespace std; int n,m; const int N=1e6+9; int a[N],c[N]; struct dd{ int d,s,t; }p[N]; bool ck(int x){//x为订单顺...
C++
二分查找
前缀和
2025-07-03
1
19
题解 | #[CQOI2010]扑克牌#
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int n,m; int a[60]; bool ck(int x){//x为组成的套数 int cn...
C++
二分查找
2025-07-03
0
20
题解 | #晾衣服#
#include<iostream> #include<algorithm> #include<cmath> #define int long long using namespace std; int n,k; const int N=1e5+9; int a...
C++
二分查找
2025-07-03
0
19
题解 | #跳石头#
#include<iostream> #include<algorithm> using namespace std; const int N=5e5+9; int d,n,a[N],m; bool ck(int x){ int cnt=0,now=a[0]; ...
2025-07-03
1
15
使用lower_bound()函数
#include<iostream> #include<algorithm> using namespace std; const int N=1e5+9; int n,a[N],q; int main(){ cin>>n; for(int i=...
C++
二分查找
2025-07-02
2
26
首页
上一页
1
2
下一页
末页