Блог пользователя SebiSebi

Автор SebiSebi, история, 6 лет назад, По-английски

Hi!

I am trying to solve problem I from the 2017-2018 ACM-ICPC Central Europe Regional Contest (CERC 17) as indicated by the official solution. I understood the divide and conquer argument but it's not clear how to compute the left intervals and the right intervals in O(hi — lo). Basically, I cannot understand how this step in the solution works: "Starting from subsequence [mid, mid + 1], we expand it to the left, storing all intervals we encounter until we exit the [lo, hi] window". How to implement this in linear time? Can someone explain this in more detail? It seems that I am missing something which may be obvious :)

Thanks!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

Автор SebiSebi, история, 9 лет назад, По-английски

Can someone give me a hint on this problem: http://www.spoj.com/problems/PT07A/. I cannot figure out how to calculate the SG numbers.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

Автор SebiSebi, 10 лет назад, По-английски

Hello!

I'm trying to understand how the algorithm for finding the minimum path cover in DAG works. I read the description from here: http://en.wikipedia.org/wiki/Maximum_flow_problem#Minimum_path_cover_in_directed_acyclic_graph . Can someone explain to me the idea behind this algorithm and why it outputs the right answer?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится