3 solutions

  • 0
    @ 2025-5-18 12:10:15
    #include <bits/stdc++.h>
    using namespace std;
    int x,y,x2,y2;
    int main()
    {
    	cin>>x>>y>>x2>>y2;
    	if(abs(x)+abs(y)>=abs(x2)+abs(y2))
    	{
    		cout<<"("<<x<<","<<y<<")\n"<<abs(x)+abs(y);
    	}
    	else
    	{
    		cout<<"("<<x2<<","<<y2<<")\n"<<abs(x2)+abs(y2);
    	}
    	return 0;
    }
    
    
    

    Information

    ID
    39
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    3
    Tags
    (None)
    # Submissions
    249
    Accepted
    64
    Uploaded By