/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 532.0 KiB
#2 Runtime Error 257ms 1.141 MiB

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