摘要:
A: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int maxx=1005; const int dx[4]={0,0,1,-1}; const int dy[4]={1,-1,0,0}; int n,sx,sy,tx,ty; 阅读全文
摘要:
A: 点击查看代码 #include<bits/stdc++.h> using namespace std; int t,ss=0,ans=0x7fffffff; int n; int w[26]; void dfs(int a,int b,int c){//遍历人数,选择人数,总体重 if(b== 阅读全文
摘要:
A:数列分段 点击查看代码 #include<bits/stdc++.h> using namespace std; int m,n; int a[100002]; int l,r; bool check(int limit){ int cnt=1,sum=0; for(int i=1;i<=n;i 阅读全文
摘要:
A: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=1e6+10; int n[N]; int m,mm,nn; int main() { scanf("%d%d",&m,&nn); for(int i=1;i<=m; 阅读全文
摘要:
A: 点击查看代码 #include<bits/stdc++.h> using namespace std; int n,a,b; priority_queue <int> q; int sum=0; int main() { scanf("%d%d%d",&n,&a,&b); //cin>>n>> 阅读全文
摘要:
A:错排问题 点击查看代码 #include<bits/stdc++.h> using namespace std; int w; long long a[22]; int main() { cin>>w; a[1]=0; a[2]=1; for(int i=3;i<=w;i++) { a[i]=( 阅读全文