/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 2ms 400.0 KiB
#3 Accepted 4ms 768.0 KiB
#4 Accepted 32ms 576.0 KiB
#5 Accepted 252ms 1.16 MiB
#6 Accepted 253ms 1.359 MiB
#7 Accepted 250ms 1.27 MiB
#8 Accepted 254ms 1.223 MiB
#9 Accepted 4ms 532.0 KiB
#10 Accepted 256ms 1.121 MiB

Code

//In the name of Allah
#include<bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define ll long long int
#define nl << '\n'
#define yes "YES\n"
#define no "NO\n"
#define sp <<' '
const int N = 2e5 + 5;
#define pb push_back
#define tt() int t; cin >> t; while(t--)
//map<string, string> ans,has;
void solve(){
    ll a, b, x;
    cin >> a >> b >> x;
    if(x>=(a+b))
        cout << 0 << " " << 0 nl;
        else{
            a -= x;
            if(a<0)
                {//a = 0;
                    b += a;
                    a = 0;
                }
                cout << a << " " << b << endl;
        }
}


int main(){
tt()
solve();
 
return 0;
}

Information

Submit By
Type
Submission
Problem
P1187 Ticket Battle: Hridoy vs Kamona
Language
C++17 (G++ 13.2.0)
Submit At
2025-04-06 18:44:10
Judged At
2025-04-06 18:44:10
Judged By
Score
100
Total Time
256ms
Peak Memory
1.359 MiB