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

Автор Hamim99, история, 3 года назад, По-английски

Problem link: https://lightoj.com/problem/penguins.
I solved this problem and my verdict is Ac. My idea is: I will take every ice bar as sink and calculate max flow. If max flow equal to total number of penguins then this bar is a one where all penguins can met.I use dinic with scaling for calculating max flow. According to my solution complexity should be n*(nmlogU) here m is the number of edge and U is maximum flow value.Again m=n^2 can be possible in this problem. So total complexity considering test case should be test*n^4*logU.Which shouldn’t pass test case according to me,but my verdict is Ac. Is this happen for weak test set?

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

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

Автор Hamim99, история, 3 года назад, По-английски

Verdict: Memory limit exceeded on Test 7
Problem link:https://acm.timus.ru/problem.aspx?space=1&num=1269
My code: https://pastebin.com/BeAwCYN5
My idea: I split the Aho-corasik tree into 5 parts.
Thanks in advance.

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

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

Автор Hamim99, история, 4 года назад, По-английски

It may the cause down vote,but i badly need to ask.Can anyone tell me array<int,2>x what does it mean?

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

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

Автор Hamim99, история, 4 года назад, По-английски
  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится