Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
造福群众,WA的来看看大家用Trie树的应该都是这样定义节点的吧,如下 struct Trie { int next[26],num; }trie[TREE_SIZE];//我是静态树 如果是,表示你的思路跟我一样,WA的原因可能也一样 在Insert(x[])时,我们把每进入一个节点就把对应的num++,表示该节点被共用的次数,但要注意应该是进入子节点后再num++,而不是从root节点开始加,因为root不代表任何字母。。。。 贡献了好多WA 昨天遇到oj大姨妈,还CE了好多次。。。。。。。。。。。。。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator