Hikaru666's blog

By Hikaru666, history, 5 weeks ago, In English,

1111B - 51 - Средняя сила супергероев My submission: 60575622 Can u give me a hint? Thanks.

 
 
 
 
  • Vote: I like it
  • -1
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I solved it, but maybe someone knows how to combine variables 'b' and 'z' in my submission? 60583085

»
5 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

i think in your submission you are doing lots of operations if you want to see a short solution i think this code in python is too short def get(): return list(map(int,input().split())) n,k,m=get() a=get() a.sort() c=(n+1)*[0] c[0]=0 for i in range(1,n+1): c[i]=c[i-1]+a[i-1] f=(c[n]-c[0]+min(m,n*k))/n for i in range(1,n): if m-i>=0: f=max((c[n]-c[i]+min(m-i,(n-i)*k))/(n-i),f) print(f) i hope you accept it :)