30 lines
587 B
C++
30 lines
587 B
C++
#include <iostream.h>
|
|
int main ()
|
|
{
|
|
int d,p,h,t,a,b,c,f;
|
|
for (d=4;d>=1;d--)
|
|
{
|
|
for (p=4;p>=1;p--)
|
|
{
|
|
for (t=4;t>=1;t--)
|
|
{
|
|
for (h=4;h>=1;h--)
|
|
{
|
|
a=((d==1)+(h==4)+(p==3));
|
|
b=((d==4)+(h==1)+(p==2)+(t==3));
|
|
c=((d==3)+(h==4));
|
|
f=((d==3)+(h==2)+(p==1)+(t==4));
|
|
if (a==1&&b==1&&c==1&&f==1&&d!=p&&d!=h&&p!=h&&p!=t&&h!=t&&t!=d)
|
|
{
|
|
cout <<"洞庭湖第" <<d <<"大"<<endl;
|
|
cout <<"鄱阳湖第" <<p <<"大"<<endl;
|
|
cout <<"洪泽湖第" <<h <<"大"<<endl;
|
|
cout <<"太湖第" <<t <<"大"<<endl;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return 0;
|
|
} |