WHY I AM GETTING WRONG ANSWERS IN 2nd TESTCASE

Правка en1, от Aayuushh19, 2022-08-20 16:03:59

https://mirror.codeforces.com/problemset/problem/1557/A

void solve(){ ll n;cin>>n; vll arr(n); FOR(i,0,n)cin>>arr[i]; double m=*max_element(all(arr)); double sum = accumulate(all(arr),0); sum=sum-m; double avg = sum/(n-1);

cout<<fixed<<setprecision(10)<<m+avg<<endl;

}

Теги implementations, brute force, *800

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Aayuushh19 2022-08-20 16:03:59 355 Initial revision (published)