Help Me With this Interesting problem on permutations.
Difference between en2 and en3, changed 0 character(s)
### Problem↵
You are give a permutation of length `n`. Among all rotations of this permutation find out the one with maximum number of `cycles`.<br>↵
`Cycles` here mean that cyles in the graph of permutation which contains edges from `element->corresponding index`. (One based indexing)<br>↵
#### Constraints:↵
`n <= 3e5`

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Misa-Misa 2023-10-10 15:53:08 0 (published)
en2 English Misa-Misa 2023-10-10 15:52:43 21 Tiny change: 'ng index`.<br>\n####' -> 'ng index`. (One based indexing)<br>\n####'
en1 English Misa-Misa 2023-10-10 15:52:12 354 Initial revision (saved to drafts)