Hamim99's blog

By Hamim99, history, 4 years ago, In English

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?

Full text and comments »

  • Vote: I like it
  • +15
  • Vote: I do not like it

By Hamim99, history, 4 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By Hamim99, history, 5 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By Hamim99, history, 5 years ago, In English

Can anyone give me hints for this proplem? https://www.spoj.com/problems/CNTPRIME/

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it