AUCSE012 - Student Proxy
A Proxy in context of class attendance refers to the act when a student who is present in a class makes attendance for a student who is absent in the same class.
There are N students in a class.
All the students have different expertise in giving proxies.
Precisely, we associate an integer P with every student which denotes the number of proxies he can make.
All students are capable of making proxies for any other student.
First line contains an integer N(1 <= N <= 1000000) denoting the total number of students.
Then, N lines follow each containing an integer Ai(1 <= Ai <= 100). The integer Ai on the ith line denotes the number of proxies that the ith student can make.
Print the minimum number of students that can be present in the class such that by giving proxies the recorded attendance can be 100%.
2 Output: 2
Explanation, one possible solution is that the first and second student are present. Now first student can give 1 proxy and second can give 2 proxies making the recorded attendance 5.
There is some Ai equal to 0.
should be moved to tutorial !!
tutorial for sure!!