Hi Codeforces community. I recently learned the trie algorithm and I'm trying to solve DICT problem form SPOJ. http://www.spoj.com/problems/DICT/ I'm getting WA for an unknown reason. Here is a link to my code. http://ideone.com/FxUaVp Any help appreciated.
Auto comment: topic has been updated by AFN (previous revision, new revision, compare).
You are almost there! Your output for the sample case is wrong