/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Wrong Answer 1ms 540.0 KiB
#3 Wrong Answer 2ms 584.0 KiB

Code

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

#define veryFast ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)
#define neg cout << -1 << endl
#define Yes cout << "YES" << endl
#define No cout << "NO" << endl
#define input(arr, n) for(int i = 0; i < n; i++) cin >> arr[i];
#define newline cout << endl
using ll = long long;
#define nl '\n'

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

    if (a + b < x) {
        cout << a << " " << b << nl;
        return;
    }

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

int main() {
    veryFast;
    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++11 (G++ 13.2.0)
Submit At
2025-04-06 15:48:47
Judged At
2025-04-06 15:48:47
Judged By
Score
10
Total Time
2ms
Peak Memory
584.0 KiB