//±ÉÈËµÄ·½·¨ //trie / const maxn=2000*75; var n,ans,nodes:longint; s:string; next:array[0. .maxn,'a'. .'z'] of longint; v:array[0. .maxn,'a'. .'z'] of boolean; procedure main; var i,j,k,tot:longint; begin readln(n); for i:=1 to n do begin readln(s); j:=1; k:=0; tot:=1; while (j<=length(s)) and (next[k,s[j]]>0) do begin
This is the end of the preview. Sign up
access the rest of the document.
This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.