/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Accepted 1ms 320.0 KiB
#3 Accepted 3ms 532.0 KiB
#4 Accepted 21ms 612.0 KiB
#5 Accepted 190ms 1.32 MiB
#6 Accepted 191ms 1.32 MiB
#7 Accepted 190ms 1.352 MiB
#8 Accepted 190ms 1.223 MiB
#9 Accepted 3ms 532.0 KiB
#10 Accepted 189ms 1.137 MiB

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