algorithm for BESTBATS

I have a problem in identifying what algorithm to use for this problem. can anyone help me to identify what method or algorithm to use for this problem.

@arvindkr
This problem can be solved by Greedy method and combinatorics.

1 Like

any algorithm exactly??

Using greedy method.
First sort the array in non-increasing order.
Take first k scores then count the number of ways of picking this scores from the scores array and you are done!

A sample code ( hope it helps) : http://www.codechef.com/viewsolution/7146481

//