I need help (again)

Правка en2, от pickle_juice2024, 2024-03-12 17:39:02

I am currently solving 1893C: https://codeforces.com/contest/1893/problem/C. For some strange reason my code gives MLE when the space complexity of my code is O(n + m) (at least I think so?). If anyone could help me, it would be highly appreciated. My code:

Spoiler

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский pickle_juice2024 2024-03-14 04:26:05 1 Tiny change: 'roblem/C. \nFor som' -> 'roblem/C. \nFor som'
en5 Английский pickle_juice2024 2024-03-12 17:40:16 0 (published)
en4 Английский pickle_juice2024 2024-03-12 17:40:03 4 Tiny change: 'think so?)\nIf anyon' -> 'think so?).\nIf anyon'
en3 Английский pickle_juice2024 2024-03-12 17:39:50 4 Reverted to en1
en2 Английский pickle_juice2024 2024-03-12 17:39:02 4 Tiny change: 'think so?)\nIf anyon' -> 'think so?).\nIf anyon' (saved to drafts)
en1 Английский pickle_juice2024 2024-03-12 05:08:42 2635 Initial revision (published)