Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int l, r, x;
cin >> l >> r >> x;
if (x > 0)
{
if (l + x > r)
cout << "-1 -1\n";
else
cout << l + x << " " << l << endl;
}
else
{
if (r + x < l)
cout << "-1 -1\n";
else
cout << r << " " << r + x << 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 17:35:55
- Judged At
- 2025-04-06 17:35:55
- Judged By
- Score
- 1
- Total Time
- 275ms
- Peak Memory
- 1.773 MiB