文章
25
粉丝
0
获赞
104
访问
3.3k
#include <iostream>
#include <string>
#include <algorithm>
#include<ctype.h>
#include<map>
#include<vector>
#include<sstream>
using namespace std;
bool cmp(char a,char b){
if(abs(a-b)==32){
return 0;
}
else{
char lowa=tolower(a),lowb=tolower(b);
return lowa<lowb;
}
}
int main() {
string str1,str2;
while(getline(cin,str1)){
for(char i:str1){
if((i>='a'&&i<='z')||(i>='A'&&i<='Z')){
str2+=i;
}
}
stable_sort(str2.begin(),str2.end(),cmp);
int ind=...
登录后发布评论
暂无评论,来抢沙发