Wrong Answer
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=0;
int m=0;
if(a>x || a+b>x) {
n=abs(a-x);
cout<<n<<" "<<b<<endl;
}
else if(a<x ||a+b==x){
m=(a+b)-x;
cout<<n<<" "<<m<<endl;
}
}
int main() { //total time to solve 17 minutes
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:41:52
- Judged At
- 2025-04-06 15:41:52
- Judged By
- Score
- 10
- Total Time
- 3ms
- Peak Memory
- 532.0 KiB