2 solutions

  • 1
    @ 2026-8-20 20:25:02
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,c,d;
    	cin>>a>>b>>c>>d;
    	if(a>c)
    	{
    		cout<<c<<" "<<d;
    	}
    	else if(c>a){
    		cout<<a<<" "<<b;
    	}
    	else
    	{
    		if(b>d)
    		{
    			cout<<c<<" "<<d;
    		}
    		else
    		{
    			cout<<a<<" "<<b;
    		}
    	}
    	return 0;
    }
    ```language
    
    • 0
      @ 2026-7-14 9:29:22

      #include<bits/stdc++.h> using namespace std; int main(){

      int t1,f1,t2,f2;
      cin>>t1>>f1>>t2>>f2;
      if(t1<t2){
      	cout<<t1<<" "<<f1;
      }
      else if(t2<t1){
      	cout<<t2<<" "<<f2;
      }
      else{
      	if(f1<f2){
      		cout<<t1<<" "<<f1;
      	}
      	else{
      		cout<<t2<<" "<<f2;	
      	}
      }
      
      return 0;
      

      }

      • 1

      Information

      ID
      3507
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      (None)
      # Submissions
      39
      Accepted
      22
      Uploaded By