BZOJ 3916 [Baltic2014]friends

【題解】   暴力枚舉添加字符的位置,然後判斷去掉這個位置的字符串是否有由兩個相同的串拼接而成。本題的n的範圍爲200W,暴力判斷會TLE,所以要使用哈希。 1 #include<cstdio> 2 #include<algorithm> 3 #include<cstring> 4 #include<map> 5 #define LL long long 6 #define N 200
相關文章
相關標籤/搜索