Wcipeg 2017-2018 Test
Geresh is applying for a specialized program at a certain high school. In order to be accepted, he must bribe teachers to give him good references. He needs references from N teachers, and each teacher has some price Pi which must be given to the teacher in secret. Fortunately, the right honourable Trustin Judeau has
been blackmailed donated to Geresh a limited budget of B dollars.
Geresh wants to find out if he will have enough money to buy all the references he needs.
The first line of input contains the integers N (1 ≤ N ≤ 10000) and B (0 ≤ B ≤ 106). The next N lines contain the integers Pi (1 ≤ Pi ≤ 106).
If Geresh will not have enough money to bribe all the teachers, output "The budget will balance itself". Otherwise, output the amount of money he will have remaining after bribing each teacher.
Sample Input 1
2 10 5 4
Sample Output 1
Sample Input 2
1 10 1000
Sample Output 2
The budget will balance itself
Point Value: 3
Time Limit: 2.00s
Memory Limit: 256M
Added: Dec 05, 2017
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3