You are given some coins. You have to take some coins from the given coins such that the sum of the coins
you took have a value strictly larger than the sum of the rest of the coins. However, you have to take
minimum number of coins while satisfying this condition
Input
In the first line, you are given n (n<=100), the number of integer numbers. In the next line, you will be given n integers, separated by spaces.
Output
Output one number, the minimum number of coins you need to take to have a larger sum than the sum of the
coins you did not take.
Input Output
2 2
3 3
3 2
2 1 2
6 2
4 2 1 2 1 1
In the first sample you will have to take 2 coins. If you take 1 coin, you get sum 3, 3. If you take 0 coins, you get
sums 0, 6. Those variants do not satisfy you as your sum should be strictly more than the other sum.
In the second sample one coin isn't enough for you, too. You can pick coins with values 1, 2 or 2, 2. In any case,
the minimum number of coins equals 2.
.
The file named called EMPLOYEE.txt contains employee details such as employee number, name, designation and salary of employee. Write a program to create a file to store the details of employee (Use of structure and fwrite () & fread () functions)
Runtime Input :
101 xyz workshop 8500
102 nmo computer 6750
103 abc store 5890
Output :
101 xyz workshop 8500
102 nmo computer 6750
103 abc store 5890