Submission #1174026

#TimeUsernameProblemLanguageResultExecution timeMemory
1174026javkhlantogsPareto (COCI17_pareto)C++20
0 / 80
202 ms11760 KiB
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
	ll n,i,j,k=0;
	long double cnt=0,ans=0,sum=0;
	cin>>n;
	map<long double,long double> mp;
	for(i=0 ; i<n ; i++){
		cin>>j;
		mp[j]+=j;
		sum+=j;
	}
	for(auto v:mp){
		if(v.second>k){
			k=v.second;
			ans=100*v.second/sum;
			cnt=100*(v.second/v.first)/n;
		}
	}
	cout<<fixed<<setprecision(15)<<cnt<<endl;
	cout<<fixed<<setprecision(15)<<ans<<endl;
	return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...