How to make this not MLE? Codeforces 641 Div2C

Правка en3, от bobbilyking, 2020-05-14 07:06:58

I'm probably being extremely dumb right now, but for round 641, div2C, I literally had the right solution but I spend 1h30m trying to implement the last part (counting factors and then getting 2nd minimum one) but I couldn't do it w/o hashmaps or arraylists, which ofc MLE. Can anyone help me approach this last part (because the editorials used the first solution, but i used the second so i have nothing to go on)

https://mirror.codeforces.com/contest/1350/submission/80029151

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский bobbilyking 2020-05-14 07:06:58 4 Tiny change: 'r round 642, div2C, I' -> 'r round 641, div2C, I'
en2 Английский bobbilyking 2020-05-14 07:06:28 21
en1 Английский bobbilyking 2020-05-14 07:06:00 499 Initial revision (published)