摘要: #include<iostream> using namespace std; int arr[10][10]; //用于存储棋盘以及之后的皇后摆放位置 int ans; //存储最后的答案 bool judge(int x, int y) //用于判断这个地方能否放置皇后 { int i, j; 阅读全文
posted @ 2023-06-04 12:41 刘海烽 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include<cstdio> using namespace std; bool d[100]={0},b[100]={0},c[100]={0}; int sum=0,a[100]; int search(int); int print(); int main(){ search(1); // 阅读全文
posted @ 2023-06-01 18:56 刘海烽 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<queue> #include<string.h> using namespace std; #define INF 0x3f3f3f3f; const int N = 3000; int n, m; int g[N][N], dist[N]; 阅读全文
posted @ 2023-05-31 13:36 刘海烽 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<cstring> #include<cmath> using namespace std; int n,length=0,vis[1000]={0};string str[1000]; inline int check(string a,str 阅读全文
posted @ 2023-05-25 12:33 刘海烽 阅读(174) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; int n,w[11000],m,ans,maxx; int main(){ scanf("%d %d",&n,&m); for(int i=1;i<=n;i++) scanf("%d",&w[i]); int 阅读全文
posted @ 2023-05-25 12:29 刘海烽 阅读(57) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; int main() { int m, s, t, a = 0, b = 0; cin >> m >> s >> t; for (int i = 1; i <= t; i++) { a += 17; if (m >= 1 阅读全文
posted @ 2023-05-25 12:28 刘海烽 阅读(54) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; const double EPS = 1e-8; int main() { int n, k; cin 阅读全文
posted @ 2023-05-25 12:26 刘海烽 阅读(157) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<algorithm>//lower_bound函数 using namespace std; typedef long long ll; const int N = 1e6+5; int n,z; ll num[N]; int main() { 阅读全文
posted @ 2023-05-25 12:25 刘海烽 阅读(177) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; int n, m, a[351], r[5], dp[41][41][41][41]; #define getchar() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 阅读全文
posted @ 2023-05-25 12:24 刘海烽 阅读(74) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <cstring> using namespace std; const int N = 110; int n; int s[N][N]; // 二维前缀和数组 int main() { cin >> n; for (int i = 1; i 阅读全文
posted @ 2023-05-25 12:21 刘海烽 阅读(142) 评论(0) 推荐(0) 编辑