Accepted
Code
#include <stdio.h>
int main(){
//SAYED AL MAMUN_LU
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
int flag = 0,yy,yy1;
if(a>=b && a>=c && a>=d){
flag = 1;
yy = a;
}
else if(b>=a && b>=c && b>=d){
flag = 1;
yy = b;
}
else if(c>=a && c>=b && c>=d){
flag = 1;
yy = c;
}
else {
flag = 1;
yy = d;
}
if(a>=b && c>=b && d>=b){
flag = 1;
yy1 = b;
}
else if(b>=a && c>=a && d>=a){
flag = 1;
yy1 = a;
}
else if(a>=c && b>=c && d>=c){
flag = 1;
yy1 = c;
}
else {
flag = 1;
yy1 = d;
}
if(flag == 1){
printf("%d\n%d",yy1,yy);
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1022 Minmax
- Contest
- Brain booster - 1
- Language
- C99 (GCC 13.2.0)
- Submit At
- 2023-12-31 13:54:41
- Judged At
- 2024-11-11 03:46:33
- Judged By
- Score
- 100
- Total Time
- 1ms
- Peak Memory
- 320.0 KiB