/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 764.0 KiB
#2 Wrong Answer 33ms 1.223 MiB
#3 Wrong Answer 37ms 1.59 MiB

Code

// Author: Shohidur Rahman
#include <bits/stdc++.h>
#define ll long long
#define fast ios_base::sync_with_stdio(0); cin.tie(0);
using namespace std;
 
int main() {
    fast;
    int t;
    cin >> t;
    while(t--){
    	ll l,r,x;
    	cin >> l >> r >> x;
    	ll max=r-l;
    	ll min=l-r;
    	if(x<=max && x>=min){
    		cout << r << " " << r-x<< "\n";
    	}
    	else cout << "-1 -1\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 16:34:09
Judged At
2025-04-06 16:34:09
Judged By
Score
1
Total Time
37ms
Peak Memory
1.59 MiB