go goa gone

http://www.spoj.com/problems/ALCATRAZ2/

Can Any One Suggest some approach for the go goa gone problem spoj?

Since there are only 8, you can use simple recursion to choose best. Start with the first pair, try removing both of them one by one recursively for further pairs and choose best outcome. Feel free to ask if any doubt!!

Yes, simple recursion got ac.
Thanks for your opinion.

1 Like

At least, you should upvote/accept if you find helpful

i tried but it says “i don’t have enough reputation.”

1 Like