Time complexity analysis, mine: O(n^3)

Revision en1, by Axialotl, 2024-11-07 16:03:42

Hi, is there a reason why my submission* got accepted meanwhile my rough estimate for time complexity is O(n^3), because i did a dfs and for every node i calculate a subset sum of each subtree size. Or is this because of weak tc? thanks

*) https://codeforces.net/contest/1856/submission/290385616

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Axialotl 2024-11-07 16:03:42 369 Initial revision (published)