[Community Puzzle] Drug Interactions

I also used clique, first without pivot test 4 and 5 timeouts, then with pivot I run N=100 in 0m0,184s. I coded in C. I think is medium because the algorithm isn’t so hard to implement, but you must know which algorithm to use that someone mention in a previous post

1 Like

I think the point of the exercise is to find the underlyging graph theory problem.

1 Like

This is one was great, 5 stars, always the best puzzles from @Westicles.

I tried so hard not to use a max-clique DC pivoted algo and even though I made it (barely) with a DFS I didn’t make it before the deadline for the contest. Without the divide and conquer there is enough you can do with a simple DFS, presorting, cache optimizing, bound pruning, and memoization pruning.

1 Like

Calling it a “simple recursive function” was a little surprising, so I checked your solution. It seems the secret ingredient was a high performance technique. I’m not going to spill the beans on your solution. I gave you 5 stars.