求助!!球球了 玄关
查看原帖
求助!!球球了 玄关
1266829
cjy2327134004楼主2024/10/23 21:46
#include<bits/stdc++.h>
using namespace std;
int q[1200];
int main()
{
	int n,m;
	double t=-1;
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		for(int o=1;o<=m;o++)
		{
			cin>>q[o];
		}
		sort(q+1,q+m+1);
		 double h=0;
		 for(int o=2;o<m;o++)
		 h+=q[o];
		 if(h>t){
		 	t=h;
		 }
		 h=0;
	}
	double c;
	c=t/m;
	printf("%.2lf",c);
	return 0;
 } 
2024/10/23 21:46
加载中...