/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 532.0 KiB

Code

#include <bits/stdc++.h>

#define JAISHRIRAM     ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define TxtIO          freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
#define f(i,a,b)       for(int i=a;i<b;i++)
#define input          for(auto &it:arr){cin>>it;}
#define pb             push_back
#define ll             long long

using namespace std;

void solve(){
    ll l,r,x;
    cin>>l>>r>>x;
    // l<=p<=r
    // l<=q<=r
    
    if(x<0 || (r-l)<x){
        cout<<-1<<" "<<-1<<"\n";
        
    }else{
        cout<<r<<" "<<r-x<<"\n";
    }
    
    

    
    
}


int main() {
   JAISHRIRAM
   int t;
   cin>>t;
   while(t--){
       solve();
   }
}

Information

Submit By
Type
Pretest
Problem
P1186 Equal to X
Language
C++17 (G++ 13.2.0)
Submit At
2025-06-12 11:25:51
Judged At
2025-06-12 11:25:51
Judged By
Score
0
Total Time
2ms
Peak Memory
532.0 KiB