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

Revision en1, by Dontony, 2021-05-29 09:44:41

Can anyone explain to me why I am getting TLE in this problem:- https://codeforces.com/contest/1526/problem/D. Here is my submission:- https://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.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Dontony 2021-05-29 09:44:41 470 Initial revision (published)