so i went and read on hash functions, i can say i learned a lot on this subject.
i ended up using Jenkins One-at-a-time hash method as seen on wikipedia, and it does the job.
i finally got AC! it is taking 7.412 seconds which is quite a lot, but at least i got AC (ill try to improve it later ...
Search found 4 matches
- Sat Nov 25, 2006 9:04 pm
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39833
- Fri Nov 24, 2006 2:21 pm
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39833
so i tried again today to solve this problem (# 902), but this time using an hashtable, by using the its_taking_forever_to_be_standard STL hash_map. the implementation is simple:
for every sub-string of size( input password size ):
try to find the sub-string on the hashtable.
found it? add 1 to its ...
for every sub-string of size( input password size ):
try to find the sub-string on the hashtable.
found it? add 1 to its ...
- Wed Nov 22, 2006 2:45 pm
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39833
- Wed Nov 22, 2006 2:32 pm
- Forum: Volume 9 (900-999)
- Topic: 902 - Password Search
- Replies: 68
- Views: 39833