#include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); int a,x,y,z; cin>>a; int f[a+1]; int he=0,m=0,n=10000,e,l,g=0; for(int i=1;i<=a;i++){ cin>>f[i]; he+=f[i]; if(f[i]>m){ m=f[i]; e=i; } if(f[i]<=n){ n=f[i]; l=i; } if(f[i]>10&&f[i]<100) g++; } cin>>x>>y>>z; cout<<he<<endl; for(int i=a;i>=1;i--) cout<<f[i]<<" "; cout<<endl; cout<<m<<" "<<e<<endl<<n<<" "<<l<<endl; cout<<g<<" "; for(int i=1;i<=a;i++){ if(f[i]>10&&f[i]<100) cout<<f[i]<<" "; } cout<<endl; for(int i=1;i<=a;i++){ cout<<f[i]<<" "; if(i==x-1) cout<<y<<" "; } cout<<endl; for(int i=1;i<=a;i++){ if(i!=z) cout<<f[i]<<" "; if(i==x-1&&i+1!=z) cout<<y<<" "; } return 0; }
共 6 条回复
@root
ykj11 谢谢
拿着满分试卷谢大佬
6,7问错了!
555……