提交 9e25e84f 编写于 作者: _WhiteFlames_'s avatar _WhiteFlames_

Add new file

上级 777fe25f
#include<bits/stdc++.h>
using namespace std;
int read()
{
int s=0,w=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
return s*w;
}
int main()
{
int a,b,c,d;
int mx1,mn1,mx2,mn2,mx,mn=0;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a>b)
{
mx1=a;
mn1=b;
}
else
{
mx1=b;
mn1=a;
}
if(c>d)
{
mx2=c;
mn2=d;
}
else
{
mx2=d;
mn2=c;
}
if(mx2>mx1)
{
mx=mx2;
}
else
{
mx=mx1;
}
if(mn1<mn2)
{
mn=mn1;
}
else
{
mn=mn2;
}
printf("%d %d",mx,mn);
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册