For this Question: N people are waiting in line to get food. The ith person takes Arr[i] amount of time to get food. A person is happy if the amount of time he has to wait is less than or equal to the amount of time he takes to get food. The time a person waits is the sum of time people in front of him take to get food. Now you have to rearrange the people in the line such that the maximum number of people in the line are happy and report the maximum number of people that can be happy.The first line of input contains a single integer N.
The second line of input contains N integers denoting Arr[i].

Constraints: 
1 <= N <= 100000
1 <= Arr[i] <= 1000000000Print the maximum number of people that can be happy after the rearrangement.Sample Input 
4
3 1 3 10

Sample Output
3

Explanation: 
The optimal arrangement is 1 3 10 3
This way person 1 waits 0 units so he is happy.
Person 2 waits for 1 unit so he is happy.
Person 3 waits for 4 units so is happy.
Person 4 waits 14 units so he is unhappy., I have written this Solution Code: n = int(input())
li = input().split()
li = list(map(int, li))

curr = 0
ans = 0

li.sort()

for i in li:
    if i >= curr:
        curr += i
        ans += 1

print(ans), In this Programming Language: Python, Now tell me if this Code is compilable or not?