Accepted
Code
#include <bits/stdc++.h>
#define ll long long int
#define N "\n"
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll t;
cin >> t;
while (t--)
{
ll a,b,x;
cin>>a>>b>>x;
if(x<=a){
cout<<a-x<<" "<<b<<N;
continue;
}
x-=a;
a=0;
if(x>b){
b=0;
}
else{
b-=x;
}
cout<<a<<" "<<b<<N;
}
}
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:36:25
- Judged At
- 2025-04-06 15:36:25
- Judged By
- Score
- 100
- Total Time
- 65ms
- Peak Memory
- 1.375 MiB