第一行单个整数表示 lns="http://www.w3.org/1998/Math/MathML">nn 第二行到第 lns="http://www.w3.org/1998/Math/MathML">n+1n+1 行第 lns="http://www.w3.org/1998/Math/MathML">i+1i+1 行有一个字符串 lns="http://www.w3.org/1998/Math/MathML">sisi,保证字符串只含小写字母 记 lns="http://www.w3.org/1998/Math/MathML">∣si∣∣si∣ 为字符串 lns="http://www.w3.org/1998/Math/MathML">sisi 的长度 lns="http://www.w3.org/1998/Math/MathML">30%30% 的数据 lns="http://www.w3.org/1998/Math/MathML">1≤n≤1001≤n≤100,lns="http://www.w3.org/1998/Math/MathML">∣si∣≤100∣si∣≤100 lns="http://www.w3.org/1998/Math/MathML">60%60% 的数据 lns="http://www.w3.org/1998/Math/MathML">1≤n≤10001≤n≤1000,lns="http://www.w3.org/1998/Math/MathML">∣si∣≤1000∣si∣≤1000 lns="http://www.w3.org/1998/Math/MathML">100%100% 的数据 lns="http://www.w3.org/1998/Math/MathML">1≤n≤500,0001≤n≤500,000,lns="http://www.w3.org/1998/Math/MathML">∣s1∣+∣s2∣+⋯+∣sn∣≤500,000∣s1∣+∣s2∣+⋯+∣sn∣≤500,000
记 lns="http://www.w3.org/1998/Math/MathML">∣si∣∣si∣ 为字符串 lns="http://www.w3.org/1998/Math/MathML">sisi 的长度
3 apple banana apple
2