摘要:
http://poj.org/problem?id=3450 沾3080的光,这题让我WA了N多次!看到两个题一样,买一送二啊,上手就做,悲剧了。。 主要是没考虑一个字符时的情况,改来改去,最后终于想起来把KMP中的m初始化成-1就OK了。我这脑子是锈掉了么?忙活3个小时最后改了一个数就行了,纠结啊!code:#include<cstdio>#include<cstring>intnext[201];charsubstr[201];charstr[4001][201];charresult[201];chartemp[201];intlen[4001];intn,max 阅读全文