/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 4ms 764.0 KiB
#4 Accepted 38ms 532.0 KiB
#5 Accepted 253ms 1.184 MiB
#6 Accepted 249ms 1.152 MiB
#7 Accepted 273ms 1.27 MiB
#8 Accepted 252ms 1.27 MiB
#9 Accepted 7ms 544.0 KiB
#10 Accepted 271ms 1.219 MiB

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