ZhaoKeyu2023 @ 2024-05-13 19:49:41
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s;
bool u=true;
cin>>s;
int flg1=0,flg2=0,flg3=0,flg4=0,len=0,cnt=0;
for(int i=0;i<s.length();i++)
{
if(s[i]==',')
{
if((flg1==1&&flg2==1)||(flg2==1&&flg3==1)||(flg1==1&&flg3==1))
{
if(flg4==1&&u)
{
for(int j=cnt;j<i;j++)cout<<s[j];
cout<<"\n";
}
}
cnt=i+1;
flg1=0,flg2=0,flg3=0,flg4=0,len=0;
u=true;
}
len++;
if(s[i]>='a'&&s[i]<='z') flg1=1;
else if(s[i]>='A'&&s[i]<='Z')flg2=1;
else if(s[i]>='0' and s[i]<='9')flg3=1;
else if(s[i]=='!'||s[i]=='@'||s[i]=='#'||s[i]=='$')flg4=1;
else if(s[i]!=',')u=false;
}
return 0;
}
by mooktian @ 2024-05-30 14:59:49
@ZhaoKeyu2023 检测到
by ZhaoKeyu2023 @ 2024-07-14 11:41:15
@mooktian 谢谢,已过,此贴结。