咻132
咻132
全部文章
题解
归档
标签
去牛客网
登录
/
注册
咻132的博客
全部文章
/ 题解
(共7篇)
题解 | #马踏棋盘#
#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
9
题解 | #老子的全排列呢#
#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
8
题解 | #【入门班】借教室#
#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
10
题解 | #[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
11
题解 | #晾衣服#
#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
11
题解 | #跳石头#
#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
10
使用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
1
15