/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 536.0 KiB
#3 Accepted 2ms 584.0 KiB
#4 Accepted 5ms 576.0 KiB
#5 Accepted 35ms 1.16 MiB
#6 Accepted 54ms 1.312 MiB
#7 Accepted 38ms 1.168 MiB
#8 Accepted 35ms 1.273 MiB
#9 Accepted 2ms 324.0 KiB
#10 Accepted 41ms 1.137 MiB

Code

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
using namespace std;
using namespace __gnu_pbds;
 
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pld;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pll> vpll;
typedef vector<pld> vpld;
 
#define int ll
#define all(it) it.begin(),it.end()
#define ord_set(T) tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update> 



void work(){
    int a,b,c;
    cin >> a >> b >> c;
    cout << max(0LL,a-c) << ' ' << max(b - max(0LL,c-a),0LL) << '\n';
}


int32_t main(){
    cin.tie(NULL);
    ios_base::sync_with_stdio(false);

    int n;
    cin >> n;
    while (n--) work();
    
    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 22:16:34
Judged At
2025-04-06 22:16:34
Judged By
Score
100
Total Time
54ms
Peak Memory
1.312 MiB