70分求调
查看原帖
70分求调
1121338
Shao_Guang楼主2025/7/21 09:46
#include<iostream>
#include<math.h>
using namespace std;
string c;
int d[4];
int s=0;
void h()
{
//	cout<< "1" <<endl;
	if(s == 0)
	{
//		cout<< "2" <<endl;
		if(c.size() >= 6 && c.size() <= 12)
		{
//			cout<< "3" <<endl;
			if(d[0] + d[1] + d[2] >=2)
			{
//				cout<< "4" <<endl;
				if(d[3] == 1)
				{
					cout<< c <<endl;
				}
			}
		}
	}
	s = 0;
	c = "";
	d[0] = 0;
	d[1] = 0;
	d[2] = 0;
	d[3] = 0;
}
int main()
{
    string a;
    cin>> a;
    int b = 0;

	for(int i  = 0;i < a.size();i++)
    {
    	
    	if(a[i] != ',' && i!= a.size())
    	{
    		c += a[i];
    		if(!(a[i] <= 'Z' && a[i] >= 'A') && !(a[i] <= 'z' && a[i] >= 'a') && !(a[i] <= '9' && a[i] >= '0') && !(a[i] == '!' || a[i] == '$' || a[i] == '@' || a[i] == '#'))
    		{
    			s = 1;
			}
		    if(a[i] <= 'Z' && a[i] >= 'A')
		    {
		    	d[0] = 1;
			}
			if(a[i] <= 'z' && a[i] >= 'a')
			{
				d[1] = 1;
			}
			if(a[i] <= '9' && a[i] >= '0')
			{
				d[2] = 1;
			}
			if(a[i] == '!' || a[i] == '$' || a[i] == '@' || a[i] == '#')
			{
				d[3] = 1;
			}
		}
		else
		{
			h();
		}
	}
}
2025/7/21 09:46
加载中...