/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 0ms 284.0 KiB
#2 Accepted 0ms 320.0 KiB
#3 Accepted 1ms 320.0 KiB
#4 Accepted 1ms 284.0 KiB
#5 Accepted 1ms 284.0 KiB
#6 Accepted 1ms 284.0 KiB

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