/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 1ms 540.0 KiB
#3 Accepted 2ms 540.0 KiB
#4 Accepted 5ms 780.0 KiB
#5 Accepted 71ms 1.336 MiB
#6 Accepted 38ms 1.316 MiB
#7 Accepted 58ms 1.352 MiB
#8 Accepted 38ms 1.328 MiB
#9 Accepted 3ms 540.0 KiB
#10 Accepted 39ms 1.312 MiB

Code

#include<bits/stdc++.h>
using ll = long long;
using ld = long double;
#define pb push_back
#define ppb pop_back
#define vi vector<int>
#define vll vector<long long>
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define pii pair<int,int>
#define pll pair<ll,ll>
#define F first
#define S second
#define yes "YES\n"
#define no "NO\n"
#define full(n) getline(cin,n)
#define SeedheMaut ios::sync_with_stdio(0); cin.tie(0);
using namespace std;
int main()
{
    SeedheMaut;
    int t;
    cin >> t;
    while(t--)
    {
        ll a,b,x;
        cin >> a >> b >> x;
        if(a>=x)
        {
            cout << a - x << " " << b << "\n";
        }
        else if(a<x && (a+b)>=x)
        {
            ll remain = x-a;
            cout << 0 << " " << b - remain << "\n";
        }
        else cout << 0 << " " << 0 << "\n";
    }
}

Information

Submit By
Type
Submission
Problem
P1187 Ticket Battle: Hridoy vs Kamona
Language
C++17 (G++ 13.2.0)
Submit At
2025-05-18 12:19:41
Judged At
2025-05-18 12:19:41
Judged By
Score
100
Total Time
71ms
Peak Memory
1.352 MiB