Блог пользователя Kaga2

Автор Kaga2, 10 лет назад, По-английски

One of the most positive things in codeforces is that we can see different approaches to solutions to the same problem.

For example to the problem 246D of today.

Approaches:

Suffix Automaton — 6626607

String Hashes — 6625476

Suffix Array — 6630083

Z-Algorithm — 6624439

KMP — 6627491

and many others, just we need find them. You have find another?

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

»
10 лет назад, # |
  Проголосовать: нравится -44 Проголосовать: не нравится

Nothing to say)

»
10 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

There is also suffix tree solution 6651814

»
10 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I have a solution that uses suffix array + LCP pre computation + hashing + two pointers. Got WA at test 29, because I used unsigned long long in the hashing part to avoid modulo. Never gonna make the same mistake :) Here is the corrected code: http://codeforces.com/contest/432/submission/6632179