sio-zvrkovi
Before departure for the wizard meeting, Lehtos was very occupied so he forgot to feed his pets - Zvrks. Zvrks are strange creatures, witch, if too hungry, eat a member of their own sort, but only if they are at least twice as heavy as it. It is certain that, if a zvrk eats another zvrk, won't be hungry until Lehtos returns.Write a program that computes the amount of zvrks Lehtos will find when he returns in the worst case.
InputThe first line of standard input contains a number 0 < N <= 100, representing the amount of Lethos's zvrks. In each of the next N lines there is one number 0 < T i <= 30000 representing the weight of the i-th zvrk.
OutputTo the standard output write one number that is the amount of zvrks Lehtos will find home when he returns in the worst case (if the biggest possible amount of zvrks are eaten).
Input:
5
40
300
100
10
30Output:
2Explanation:
30 eats 10, 100 eats 30, 300 eats 100. 2 left.
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.