Kamehameha-Greedy approach

@kevinsogo Thanks for your time :slight_smile:
Hats off for the test cases.

1 Like

@soubhagya
what kind of approach is this ?
http://www.codechef.com/viewsolution/2827617
thank you very much

Can anyone please tell if my greedy solution is failing for any test case. I am finding out the row or the column having minimum number of demon and then i am removing the corresponding row or columns of the minimum row or column. My solution is http://www.codechef.com/viewsolution/2809364.

@admin I feel that all those AC solutions which were done using greedy should be re-evaluated to WA as a greedy approach is bound to fail on some method or the other as shown by @kevinsogo on this thread and on many other Kamehameha threads.

best way to check is take a already made solution using “bi-partite matching” from solution and
compare result from greedy algorithm using randomly generated test cases. write a simple code for that
, if after millions tests u get same ans for both then try and mathematically prove the algorithm u designed to be optimal(or not optimal).

agreed…