2 条题解

  • 0
    @ 2024-10-4 13:55:29
    #include<bits/stdc++.h>
    using namespace std;
    int main() {
    	int a,b,c[10000]={0},d=0,e=0;
    	cin>>a;
    	for(int i=0;i<a;i++){
    		cin>>b;
    		c[i]=b;
    		d+=b;
    	}
    	d/=a;
    	cout<<d<<endl;
    	for(int i=0;i<a;i++){
    		if(c[i]>d){
    			e+=1;
    			cout<<c[i]<<" ";
    		}
    	}
    	cout<<endl<<e;
    	return 0;
    }
    

    信息

    ID
    116
    时间
    1000ms
    内存
    256MiB
    难度
    7
    标签
    递交数
    19
    已通过
    9
    上传者