Getting TLE in Problem D Kill Anton from Cf round 723Div 2.

Правка en1, от Dontony, 2021-05-29 09:44:41

Can anyone explain to me why I am getting TLE in this problem:- https://mirror.codeforces.com/contest/1526/problem/D. Here is my submission:- https://mirror.codeforces.com/contest/1526/submission/117731679. I just iterated over all the 24 permutations of "ANOT" and then formed the string and found the minimum swaps required for this string in O(n).(the counting part is taken from GFG which works in O(n)).

Thank you.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Dontony 2021-05-29 09:44:41 470 Initial revision (published)