Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Interesting problem

Revision en4, by Romed, 2019-06-11 11:19:46

Hello everyone
I've come across this problem and I can't figure out how to solve it.
We have an array a of length N (1<N<60) . We write down average of all the sub arrays of a and sort them. The problem is what is the Kth number (1<K<2^N)
sample input
4 10
1 2 3 4
Sample output
8/3

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English Romed 2019-06-11 11:21:13 0 (published)
en4 English Romed 2019-06-11 11:19:46 44 Tiny change: 'nput\n4 10\n1 2 3 4\' -> 'nput\n4 10 \n1 2 3 4\'
en3 English Romed 2019-06-11 11:09:58 6 Reverted to en1
en2 English Romed 2019-06-11 11:09:41 6
en1 English Romed 2019-05-10 03:08:59 309 Initial revision (saved to drafts)