vector<
int
> ivec(26, 0);//vector26个元素赋值为0
for
(
i = 0; i < str.size(); i++)
//统计字符出现的次数
{
j = str[i] -
'a'
;//不同j指向不同字母
ivec[j]++;//对j值相同者自加1
}