/ SeriousOJ /

Record Detail

Runtime Error


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 540.0 KiB
#2 Runtime Error 37ms 1.504 MiB

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;
    ll t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1186 Equal to X
Contest
Brain Booster #9
Language
C++11 (G++ 13.2.0)
Submit At
2025-04-06 15:53:03
Judged At
2025-04-06 15:53:03
Judged By
Score
0
Total Time
37ms
Peak Memory
1.504 MiB