/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 268ms 1.211 MiB
#3 Wrong Answer 275ms 1.773 MiB

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