文章
11
粉丝
70
获赞
0
访问
7.0k
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
using namespace std;
#include <string.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <stdlib.h>
int main() {
char s[1005];
gets(s);
int sl = strlen(s);
//先转小写
for (int i = 0; i < sl; i++) {
if (s[i] >= 'A' && s[i] <= 'Z') {
s[i] = s[i] + 32;
}
}
map<char, int>M;
//初始化map,只包含26个小写字母和0
for (int i = 0; i < 26; i++) {
M['a' + i] = 0;
//cout << M['a' + i] << endl;
&n...
登录后发布评论
暂无评论,来抢沙发