摘要:
program trie;Var ch:array[0..1000,'A'..'z'] of longint; isword:array[0..1000] of boolean; top:longint;Procedure insert(p:string);var k,now:longint; begin k:=1;now:=1; while k<=length(p) do begin if not (ch[now,p[k]]<>0) then begin inc(top); ch[now,p[k]]:=top; end; now:=... 阅读全文