Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t; cin>>t;
while(t--)
{
int str,sum;
int a,b,x; cin>>a>>b>>x;
if(a > x)
{
str = a - x;
sum = b;
}
else
{
if((a - x) < 0)
{
str = 0;
sum = b - abs(a - x);
}
else
{
str = abs(a - x);
sum = b - str;
}
}
cout<<str<<" "<<sum<<endl;
}
}
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:50:45
- Judged At
- 2025-04-06 15:50:45
- Judged By
- Score
- 10
- Total Time
- 4ms
- Peak Memory
- 556.0 KiB