ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1590. Bacon’s Cipher

How store data in Java?
Posted by KALO 12 Jul 2009 06:34
I have a good hash function (I think), but i don`t know how to store the hash codes for fast access. please help

Edited by author 12.07.2009 06:39
Re: How store data in Java?
Posted by Igor9669 17 Jul 2009 18:47
Use an array of hashes of all preffix of the string!
Re: How store data in Java?
Posted by Alex Tolstov (Vologda STU) 19 Jul 2009 00:10
use hash table... it's simple and fast.
AC
Posted by KALO 26 Jan 2010 01:26
Finally I managed to get AC with O(n^2logn) suffix array.
Re: AC
Posted by Baurzhan 26 Jan 2010 11:44
This problem can be solved with prefix-function in O(N^2) and sizeof(bool)*5000*5000 memory.