Runtime Error
Code
#include <iostream>
using namespace std;
int main()
{
int tc;
cin>>tc;
while(tc--){
int a,b,c;
cin>>a>>b>>c;
if(c>=0){
int d=abs(a-b),e=abs(c);
if(d>=e){
cout<<a+1+c<<" "<<a+1<<endl;
}
else cout<<-1<<" "<<-1<<endl;
}
else {
int d=abs(a-b),e=abs(c);
if(d>=e){
cout<<a+1<<" "<<a+1+c<<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 16:31:11
- Judged At
- 2025-04-06 16:31:11
- Judged By
- Score
- 1
- Total Time
- 304ms
- Peak Memory
- 1.738 MiB