05 2023 档案
摘要:#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];
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文
摘要:#include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; const double EPS = 1e-8; int main() { int n, k; cin
阅读全文
摘要:#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() {
阅读全文
摘要:#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,
阅读全文
摘要:#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
阅读全文
摘要:#include <iostream> #include <algorithm> using namespace std; int main() { int n, k; cin >> n >> k; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i
阅读全文
摘要:#include<iostream> using namespace std; int flag[10005]; //堆空间,默认初始化全是0,等价于 int flag[10005]={0}; //flag值为0表示没水塘,为1表示有水塘 int main(){ int n,m,k; //n,m,k
阅读全文
摘要:#include<iostream> using namespace std; int k, v, m; //v 顶点 k 边数 m 颜色种类 int ans; //记录最后答案 int col[1010]; //标记每个顶点所图颜色 int graph[1010][1010]; //二维数组存图
阅读全文
摘要:#include<iostream> #include<vector> #include<algorithm> using namespace std; vector<int>vd; vector<int>vn; int n; int minsize; int maxsize; int main()
阅读全文
摘要:#include <iostream> using namespace std; char maze[8][8]; void dfs(int x, int y); void print() { for (int i = 0; i < 8; i++) { for (int j = 0; j < 8;
阅读全文
摘要:#include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; int par[105] = { 0 }; int rank0[105] =
阅读全文
摘要:#include<iostream> #include<vector> #include<algorithm> #define x first #define y second #define pll pair<int,int> using namespace std; int main() { v
阅读全文
摘要:/* * @Description: To iterate is human, to recurse divine. * @Autor: Recursion * @Date: 2022-05-16 22:59:39 * @LastEditTime: 2022-05-16 23:27:17 */ #i
阅读全文
摘要:#include<iostream> using namespace std; int arr[500010],temp[500010]; long long ans; //记录逆序的组数 //归并排序 void merge_sort(int arr[], int temp[], int left,
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; /* * 1 6 -45 22 42 -16 -41 -27 56 30 -36 53 -37 77 -36 30 -75 -46 26 -38 -10 62 -32 -54 -6 45 */ int main
阅读全文
摘要:#include<iostream> using namespace std; int arr[100010]; int main() { int n; cin >> n; int i; for (i = 1; i <= n; i++) { cin >> arr[i]; //输入非降序列 } int
阅读全文
摘要:#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f const int N = 3000; // N为定点数,邻接矩阵中 N 一般不要超过5000,否则会存在内存问题 int n, m; int g[N][N],
阅读全文
摘要:#include <iostream> #include <cmath> using namespace std; #define N 300004 int d[N]; int distance(int n); int main() { //把每个要删除的数字的位置记录下来 //并且计算出他们到自己
阅读全文
摘要:#include<cstdio> #include<iostream> const int MAXN=1000005; const int INF=0x3f3f3f3f; const int mod=998244353; using namespace std; int pre[MAXN], a[M
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; const int inf=0x3f3f3f3f; const int maxn=13000; int t,c,ts,te; int dis[maxn]; bool vis[maxn]; struct node
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; struct Node { int w, v; }a[110]; bool cmp(Node aa, Node bb) { return aa.v * bb.w > aa.w *
阅读全文
摘要:#include<iostream> #include<cstring> using namespace std; //将字符串每一位改为数字,再反向计算,最后处理进位问题。 int main() { char a[101], b[101]; //定义字符数组是为了好测量,输入的长度 while (
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int main() { int N; while(cin>>N) { int a[3001]={0}; int i=0; a[0]=1; while(N) { for(i=0;i<3001;i++) { if
阅读全文
摘要:#include <iostream> using namespace std; int main() { int a[50] = { 0 }, b[50] = {0}, m, n, i, x, j = 1, count = 0; while (cin >> m >> n) { x = m; //防
阅读全文
摘要:#include <bits/stdc++.h> using namespace std; const int maxn=206; int n[maxn],m[maxn],ans[maxn]; int main(int argc, char const *argv[]) { string a,b;
阅读全文
摘要:#include<stdio.h> #include<string.h> int main() { int a[201]={0},b[201]={0}; char c[201]={'\0'},d[201]={'\0'}; //*字符数组用来储存输入的两个大整数 while(gets(c)) //*多
阅读全文