Needed help in COMPFEST 15 — Preliminary Online Mirror (Unrated, ICPC Rules) Problem C

Revision en1, by Suiiinaldo, 2023-09-11 00:06:16

1866C - Completely Searching for Inversions

What is leading my solution to go memory limit exceeded? Please Help. And Can Anybody give hint about the correct approach. I am going with the complete brute force approach of calculating the Z Array and then finding the number of inversion in linear time. I was calculating the Z Array according to the given question.

My Submissions are as follows: 221686347 221686896

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Suiiinaldo 2023-09-11 00:06:16 510 Initial revision (published)