Runtime Error
Code
#include<bits/stdc++.h>
using namespace std;
int main(){
long long t;
cin >> t;
while(t--){
int a,b,c,p=-1,q=-1,x=0;
cin >> a>>b>>c;
p=b-a;
q=p-c;
if(c<0&&q-p==c)
{
cout << p << " "<<q<<endl;
}
if(c>0&&p-q==c){
cout << p << " "<< q<< 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:21:26
- Judged At
- 2025-04-06 16:21:26
- Judged By
- Score
- 0
- Total Time
- 257ms
- Peak Memory
- 1.141 MiB