/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 1ms 556.0 KiB
#3 Accepted 2ms 540.0 KiB
#4 Accepted 5ms 796.0 KiB
#5 Accepted 37ms 1.34 MiB
#6 Accepted 37ms 1.375 MiB
#7 Accepted 37ms 1.52 MiB
#8 Accepted 37ms 1.355 MiB
#9 Accepted 2ms 540.0 KiB
#10 Accepted 38ms 1.383 MiB

Code

#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define int ll
using pii = pair<int, int>;
template<typename T> using minHeap = priority_queue<T, vector<T>, greater<T>>;
#define all(x) x.begin(),x.end()
#define V vector
#define size(v) (int(v.size()))
const ll mxn= 2e5+3, inf= 1.5e18,mod= 1e9+7;//998244353;
// iwkms
void pre(){}
void solve() {
    int a, b, x;cin>>a>>b>>x;
    int hdibe = min(a,x);
    a -= hdibe; x -= hdibe;
    int kdibe = min(b, x);
    b -= kdibe; x -= kdibe;
    cout<<a<<" " << b<<'\n';
}
int32_t main() 
{
    pre();
    cin.tie(0)->sync_with_stdio(0);
    int t=1;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:33:15
Judged At
2025-04-06 15:33:15
Judged By
Score
100
Total Time
38ms
Peak Memory
1.52 MiB