Kaga2's blog

By Kaga2, 11 years ago, In English

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?

  • Vote: I like it
  • +69
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it -44 Vote: I do not like it

Nothing to say)

»
11 years ago, # |
  Vote: I like it +3 Vote: I do not like it

There is also suffix tree solution 6651814

»
11 years ago, # |
  Vote: I like it +3 Vote: I do not like it

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://mirror.codeforces.com/contest/432/submission/6632179