Блог пользователя m.cpp

Автор m.cpp, 9 месяцев назад, По-английски

Hi!

I'm practicing coding in the new Rust language and today I'm struggling while solving this problem: 557E - Аня и полупалиндром. The main idea is to build a trie that contains all the suffixes of a binary string $$$s$$$ having a maximum length of $$$5000$$$.

I was able to code in C++ and get an AC, but when I switched to Rust, I got MLE verdict on test 9. Though both solutions have the same approach.

I think the main issue is that my $$$trie$$$ array contains too many elements and there are differences in the data storage mechanisms between C++ and Rust.

I'm new to this language anyway so any suggestions are appreciated. Thanks in advance!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +20
  • Проголосовать: не нравится