/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 1ms 404.0 KiB
#3 Accepted 2ms 716.0 KiB
#4 Accepted 5ms 588.0 KiB
#5 Accepted 42ms 1.363 MiB
#6 Accepted 36ms 1.527 MiB
#7 Accepted 36ms 1.52 MiB
#8 Accepted 36ms 1.359 MiB
#9 Accepted 2ms 556.0 KiB
#10 Accepted 36ms 1.289 MiB

Code

/*
 * Name : Md. Fahmidur Rahman Nafi
 * Date : 2025-04-06   Time : 20:31:03
 */

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define ld long double
#define ull unsigned long long
#define lcm(a,b) ((a*b)/__gcd(a,b))
#define debug(x) cout << "Debug : " << x << endl;
const double PI = 2 * acos(0.0);
const int MOD = 1000000007;

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

    a -= min(a, x);
    x -= min(A, x);
    b -= min(b, x);

    cout << a << ' ' << b << endl;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int t;
    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:33:27
Judged At
2025-04-06 15:33:27
Judged By
Score
100
Total Time
42ms
Peak Memory
1.527 MiB