# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1174026 | javkhlantogs | Pareto (COCI17_pareto) | C++20 | 202 ms | 11760 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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |