Tehran 2015 — Help with Billboard problem

Правка en1, от Hailo, 2016-10-17 19:06:57

Hi, could someone help me solving the following problem? LINK

I've tried 2 solutions, one with complexity O(N^3 logN) using two mutlisets and other O(N^3 log^2N) using a BIT (I have the test cases and seams that this second solution runs faster). I got TLE with both approaches, so I came here to ask help. Hope someone could give me a better solution.

Thanks

Теги tehran, data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Hailo 2016-10-17 19:06:57 533 Initial revision (published)