I have a question about CF#745(div.2)F Subsequence

Правка en2, от pengyule, 2021-11-15 12:07:16

Hi. The tutorial said that the total time complexity of the solution is $$$O(n^2)$$$, but there seems to be 2 layers of "for"s in each turn of "dfs", which seems to be $$$O(n^3)$$$. Though it must be less than $$$O(n^3)$$$, could anyone please analyse detailedly of the problem? THX!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский pengyule 2021-11-15 12:07:16 1 Tiny change: 'there seem to be 2 l' -> 'there seems to be 2 l'
en1 Английский pengyule 2021-10-04 06:23:26 320 Initial revision (published)