Accepted
Code
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
int t; cin>>t;
while (t--)
{
ll a,b,x;
cin>>a>>b>>x;
if (x <= a) {
a -= x;
}
else {
x -= a;
a = 0;
b = max(0LL, b - x);
}
cout<<a<<" "<<b<<endl;
}
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:46:18
- Judged At
- 2025-04-06 15:46:18
- Judged By
- Score
- 100
- Total Time
- 273ms
- Peak Memory
- 1.27 MiB