include [HTML_REMOVED]
using namespace std;
void f(int x,int y,int z)
{
if(y>=1 && y<=12 && z>=1 && z<=31)
{
if(x<=59 && x>=0)
{
if(y==1 || y==3 || y==5 || y==7 || y==8 || y==12 || y==10)
printf(“20%02d-%02d-%02d\n”,x,y,z);
else if(y==2 && z<=28 && (x+2000)%4!=0)
printf(“20%02d-%02d-%02d\n”,x,y,z);
else if(y==2 && z<=29 && (x+2000)%4==0)
printf(“20%02d-%02d-%02d\n”,x,y,z);
else if((y==4 || y==6 || y==9 || y==11) && z<=30 )
printf(“20%02d-%02d-%02d\n”,x,y,z);
}
if(x>=60 && x<=99)
{
if(y==1 || y==3 || y==5 || y==7 || y==8 || y==12 || y==10)
printf(“19%02d-%02d-%02d\n”,x,y,z);
else if(y==2 && z<=28 && (x+1900)%4!=0)
printf(“19%02d-%02d-%02d\n”,x,y,z);
else if(y==2 && z<=29 && (x+1900)%4==0)
printf(“19%02d-%02d-%02d\n”,x,y,z);
else if((y==4 || y==6 || y==9 || y==11) && z<=30 )
printf(“19%02d-%02d-%02d\n”,x,y,z);
}
}
}
int f2(char a)
{
int x=(int)a;
int y=x-‘0’;
return y;
}
int comp(int x,int y)
{
if(x==y)
return 2;
if(x<=59 && y<=59)
{
if(x[HTML_REMOVED]=60 && y>=60)
{
if(x[HTML_REMOVED]=60 && y<=59)
return 1;
if(x<=59 && y>=60)
return 0;
}
int comp2(int x,int y)
{
if(x==y)
return 2;
if(x[HTML_REMOVED]>a[i];
x+=f2(a[0])10;
x+=f2(a[1]);
y+=f2(a[3])10;
y+=f2(a[4]);
z+=f2(a[6])*10;
z+=f2(a[7]);
//printf(“%d %d %d\n”,x,y,z);
if(x==z && x==y)
{
f(x,y,z);
return 0;
}
if(x==y && comp(x,z))
{
f(x,y,z);
f(z,x,y);
return 0;
}
if(x==y && !comp(x,z))
{
f(z,x,y);
f(x,y,z);
return 0;
}
if(comp(x,z))
{
if(comp2(x,y))
{
f(x,y,z);
f(z,x,y);
f(z,y,x);
}
else
{
f(x,y,z);
f(z,y,x);
f(z,x,y);
}
}
else
{
if(comp2(x,y))
{
f(z,x,y);
f(z,y,x);
f(x,y,z);
}
else
{
f(z,y,x);
f(z,x,y);
f(x,y,z);
}
}
return 0;
}
枚举永远的神!!!!
我快写吐了