Help me optimize my solution for 383 Div1 D pls

Правка en1, от PUSSY_LICKING_LOLI_69, 2024-10-25 07:51:42

Link to the problem: https://mirror.codeforces.com/contest/741/problem/D

I came up with a solution using Small To Large and Xor Hashing, but my time complexity is $$$O(n*log^2(n)*26)$$$, which is still not optimized enough. It got the extra $$$log$$$ from using map, and I'm not sure of how to get rid of the map. Can someone help me pls?

My Code (I switched to unordered_map and it still TLEs)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский PUSSY_LICKING_LOLI_69 2024-10-25 16:48:04 263
en1 Английский PUSSY_LICKING_LOLI_69 2024-10-25 07:51:42 2989 Initial revision (published)