/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 1ms 540.0 KiB
#3 Accepted 3ms 540.0 KiB
#4 Accepted 19ms 540.0 KiB
#5 Accepted 173ms 1.312 MiB
#6 Accepted 173ms 1.27 MiB
#7 Accepted 173ms 1.289 MiB
#8 Accepted 172ms 1.25 MiB
#9 Accepted 3ms 540.0 KiB
#10 Accepted 174ms 1.27 MiB

Code

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


void solve(){
    ll a,b,x;   cin >> a >> b >> x;
    if(a+b > x){
        if(a >= x)   cout << a - x <<  " " << b << endl;
        else    cout << 0 <<  " " << b - (x-a) << endl;
    }else{
        cout << 0 <<  " " << 0 << endl;
    }    
}


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

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:54:51
Judged At
2025-04-06 15:54:51
Judged By
Score
100
Total Time
174ms
Peak Memory
1.312 MiB