Accepted
Code
#include<iostream>
#include<set>
#include<climits>
#include<algorithm>
#include<vector>
#include <map>
using namespace std;
#define speedBoost ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long int
void solve(){
int a,b,x;
cin>>a>>b>>x;
int n=abs(a-x);
int m=0;
if(a>=x) {
n=abs(a-x);
cout<<n<<" "<<b<<endl;
}
else if(b>=n){
cout<<0<<" "<<b-n<<endl;
}
else cout<<0<<" "<<0<<endl;
}
int main() {
speedBoost;
int tc;
cin>>tc;
while(tc--){
solve();
}
}
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:51:11
- Judged At
- 2025-04-06 15:51:11
- Judged By
- Score
- 100
- Total Time
- 191ms
- Peak Memory
- 1.352 MiB