Facebook HackerCup 2017 Round 1 Fighting Zombies Doubt

Правка en1, от infomaniac, 2017-01-21 12:21:59

I followed the official editorial for this and I seem to be getting WA on a handful of cases. I am using an optimzed version of the algorithm in the editorial. The logic is that for every zombie, we can construct 4 squares of side 'r' with the point at each of the square corners. So select any two points and for all 16 sets of square for these two, find the points in the union of these two squares and output the max. The exact code is given here

Теги facebook hacker cup, #geometry, greedy, #c++

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский infomaniac 2017-01-21 12:21:59 535 Initial revision (published)