2342 - Puzzle out

Do you want to discuss about these problems? Go now!
Users are shared (no need to re-register).

Moderator: Board moderators

Post Reply
serur
A great helper
Posts: 251
Joined: Thu Feb 23, 2006 11:30 pm

2342 - Puzzle out

Post by serur » Sun Nov 25, 2007 8:49 pm

I was trying to solve 2342 from LA with the same approach as that of 843 - 'Crypt Kicker', but got TLE.
Moha was suggesting trie-based solution, but I can't see how tries can help save by preventing repeated words.
My algo:
Wit every word I associate 2 ints: its length and the number of different letters it contain, and
based on these characteristics construct linked lists. Then just try to map each word from text to the words in the dictionary.

What you think of it?

Post Reply

Return to “ACM ICPC Archive Board”