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

Правка en1, от Jratos, 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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Jratos 2024-11-07 16:03:42 369 Initial revision (published)