好纠结啊,就是因为一个小小的错误,导致一错再错!一开始是这样写的:
p = (p == root) ? p : p->child[index] ;
我觉得跟另一种写法没什么区别啊!?但是后来想一想,区别还是有的,只不过自己看不太清楚而已~~~
发现网上几乎没有此题的解题报告,于是贴出来,大家共勉吧~~~
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn/showproblem.php?pid=1277
Name : hdu 1277 ( 全文检索 )
Date : Friday, June 24, 2011
Time Stage : Many days
Result:
4088782 |
2011-06-24 22:10:34 |
Accepted |
125MS |
19304K |
C++ |
|||
4088768 |
2011-06-24 22:05:15 |
Wrong Answer |
0MS |
240K |
C++ |
Test Data:
Review:
//----------------------------------------------------------------------------*/