/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Accepted 2ms 408.0 KiB
#3 Accepted 4ms 548.0 KiB
#4 Accepted 28ms 568.0 KiB
#5 Accepted 259ms 1.27 MiB
#6 Accepted 262ms 1.301 MiB
#7 Accepted 280ms 1.262 MiB
#8 Accepted 254ms 1.152 MiB
#9 Accepted 4ms 532.0 KiB
#10 Accepted 274ms 1.285 MiB

Code

#include<bits/stdc++.h>
#define ll long long
using namespace std;

int main() {
  int t;
  cin >> t;
  while (t--){
    ll a, b, c;
    cin >> a >> b >> c;
    if (a + b <= c) cout << "0 0" << endl;
    else{
      ll mn = min(c, a);
      a -= mn, c -= mn;
      mn = min(b, c);
      b -= mn;
      cout << a << " " << b << 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 16:03:11
Judged At
2025-04-06 16:03:11
Judged By
Score
100
Total Time
280ms
Peak Memory
1.301 MiB