Can any one expline to me why my code takes 1620 ms to get the answer?

Правка en1, от DiaaEddin, 2017-07-17 16:29:25

I solved Mister B and PR Shifts using trie ... Time complexity of my code is O(n * log(n)) where maximum n = 1000000 ... but it takes about 1620 ms at least to get the answer, so can anyone please tell me why? this is my first submission: http://codeforces.me/contest/819/submission/28102807 and this is the best code I came up with: http://codeforces.me/contest/819/submission/28110510 sorry for my bad English. thanks.

Теги trie

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский DiaaEddin 2017-07-17 21:47:04 385
en1 Английский DiaaEddin 2017-07-17 16:29:25 663 Initial revision (published)