/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 332.0 KiB
#2 Accepted 2ms 540.0 KiB
#3 Accepted 2ms 588.0 KiB
#4 Accepted 5ms 748.0 KiB
#5 Accepted 37ms 1.539 MiB
#6 Accepted 38ms 1.246 MiB
#7 Accepted 38ms 1.328 MiB
#8 Accepted 41ms 1.309 MiB
#9 Accepted 2ms 540.0 KiB
#10 Accepted 38ms 1.234 MiB

Code

/* 
*   @author:- SYEDA SADIATUL JANNAT TUSHI
*   date & time :2025-03-17 02:32:27
*   BANGLADESH , SYLHET. 
*/

#include <bits/stdc++.h>
using namespace std;

#define endl          '\n'
#define ll            long long
#define vi            vector<ll>
#define pii           pair<ll,ll>
#define vii           vector<pii>
#define sz(x)         (int)x.size()
#define be(x)         x.begin(), x.end()
#define srt(v)         sort(v.begin(),v.end())
#define rsrt(v)        sort(v.rbegin(),v.rend())
#define fl(i, a, b)   for(ll i = (a); i < (b); i++)
#define print(v)      for(auto e:v) cout<<e<<" "; cout<<endl;
#define InShaAllah    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);


void solve(){
   ll a, b ,x;
   cin >> a >> b >> x;

   if(x <= a){
    cout<< a-x << " "<<b <<endl;
   }
   else if(x >a && x<= (a+b)){
    cout<< 0 <<" "<< b- (x-a)<<endl;
   }
   else{
    cout<< 0 <<" "<<0 <<endl;
   }
   
}

int main(){
    InShaAllah

    ll t=1; cin >> t;
    while (t--)
    {
        solve();
    }
    
}

Information

Submit By
Type
Submission
Problem
P1187 Ticket Battle: Hridoy vs Kamona
Contest
Brain Booster #9
Language
C++17 (G++ 13.2.0)
Submit At
2025-04-06 15:38:18
Judged At
2025-04-06 15:38:18
Judged By
Score
100
Total Time
41ms
Peak Memory
1.539 MiB