Complexity!

Revision en2, by Hamim99, 2021-03-23 22:25:27

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?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Hamim99 2021-03-23 22:25:27 22
en1 English Hamim99 2021-03-23 22:19:13 655 Initial revision (published)