I guess these are not corner cases, what I have done was : I have generated test cases using a script and checked your code with the accepted one. That’s all I did !!!, but you need to think(or try some random small cases using pen paper and check with them) if you didn’t have accepted code with you.
Hello friends
Here is the link to my code http://www.codechef.com/viewsolution/5602196
I’ve tried almost all corner test cases and even the ones mentioned above but still my code gives a WA. Please tell me where am I going wrong.
My algorithm was to
find all subsets of the given sanskar intensities
filter out the subsets having sum = sum(sanskars)/K
find such K subsets and check if all the sanskars have been used.