TLE Problem with Challenge Question SEAVEC

@admin I don’t know what is happening in rejudging.
My solution got AC at the time of contest now it is getting TLE for most of the submissions even though my complexity is n** k ** 10.