Link to the problem: http://codeforces.me/problemset/problem/607/A
Latest submission: http://codeforces.me/contest/607/submission/18781430
Code with comments: http://ideone.com/qlKrkI
I am trying an approach which uses DP to find the maximum number of previously activated beacon at position i, and finding the first out of range beacon by using binary search.
It seems that I am over-counting the activatable beacon in test 11, any thoughts why it went wrong? :/
Thanks for any help in advance.