Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
ll tc;
cin>>tc;
while(tc--)
{
ll p,q,x;
cin>>p>>q>>x;
ll d=q-x;
if(abs(p-q)>=abs(x))
{
if(x<0)
{
cout<<max(p,q)<<' '<<max(p,q)+x<<endl;
}
else
{
cout<<min(p,q)<<" "<<min(p,q)+x<<endl;
}
}
else
cout<<-1<<" "<<-1<<endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1186 Equal to X
- Contest
- Brain Booster #9
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2025-04-06 15:38:02
- Judged At
- 2025-04-06 15:38:02
- Judged By
- Score
- 0
- Total Time
- 174ms
- Peak Memory
- 1.328 MiB