/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Wrong Answer 250ms 1.301 MiB
#3 Wrong Answer 299ms 1.539 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 << "\n";
        } else {
            if ((r + x) < l)
                cout << "-1 -1\n";
            else
                cout << r << " " << r + x << "\n";
        }
    }
    return 0;
}

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:38:50
Judged At
2025-04-06 17:38:50
Judged By
Score
1
Total Time
299ms
Peak Memory
1.539 MiB