摘要:
点击查看代码 #include <iostream> using namespace std; // 题目说明 N, M <= 100,所以数组开稍微大一点防越界 const int MAXN = 105; int N, M; char field[MAXN][MAXN]; // 存地图 // 定义 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; typedef pair<int,int> PII; int n; int a[35][35]; int dx[4]={0,0,1,-1}; int dy[4]={1,-1,0,0}; void 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1005; int n,m; char g[N][N]; //联通块对应的id int cid[N][N]; //连通块对应的大小 int csize[N*N]; //连通 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; int n,m; int a[25]; long long ans; bool prime(int x) { if(x==1||x!=2&&x%2==0) return false; for(in 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=1e6+10; int n; LL a[N],s[N]; int main() { cin>>n; LL sum=0; for( 阅读全文
摘要:
点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=1e5+10; int n,k; LL a[N],b[N],s[N]; bool check(LL x) { //预处理前缀和数 阅读全文