求助
查看原帖
求助
970141
GreenMelon楼主2024/7/19 16:29

样例全过

#include <bits/stdc++.h>
using namespace std;
string s, mima[105];
int tot;
int main(){
	cin>>s;
	for(int i=0;i<s.size();i++){
		if(s[i]==','){
			tot++;
			continue;
		}
		mima[tot]+=s[i];
	}
	for(int i=0;i<=tot;i++){
		bool is=false;
		int da=0, xiao=0, shu=0, teshu=0;
		for(int j=0;j<mima[i].size();j++){
			char c=mima[i][j];
			if(c>='a' && c<='z') {xiao++; continue;}
			if(c>='A' && c<='Z') {da++; continue;}
			if(c>='0' && c<='9') {shu++; continue;}
			if(c=='!') {teshu++; continue;}
			if(c=='@') {teshu++; continue;}
			if(c=='#') {teshu++; continue;}
			if(c=='$') {teshu++; continue;}
			is=true;
		}
		if(mima[i].size()>=12 || mima[i].size()<=6) is=true;
		if(!is && ((da && xiao) || (xiao && shu) || (shu && da)) && teshu>=1) cout<<mima[i]<<endl;
	}
	return 0;
}
2024/7/19 16:29
加载中...