implemnet cychen-10029
 compare with length -1,0,1
implemnet cychen-10029
 compare with length -1,0,1
Merge branch 'cychen/10029' of https://github.com/Judge-Team/UVa-Online-Judge into cychen/10029
performance improve
AC 10029
Merge branch 'cychen/10029'