/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 348.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Accepted 2ms 332.0 KiB
#4 Accepted 5ms 580.0 KiB
#5 Accepted 49ms 1.27 MiB
#6 Accepted 38ms 1.27 MiB
#7 Accepted 42ms 1.188 MiB
#8 Accepted 59ms 1.129 MiB
#9 Accepted 2ms 532.0 KiB
#10 Accepted 39ms 1.211 MiB

Code

// I AM A MUSLIM

#include "bits/stdc++.h"

#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")

#define fast_io std::ios::sync_with_stdio(0);std::cin.tie(0)
#define lli long long int
#define flush fflush(stdout)
#define line printf("\n")
#define yn(a, b) printf("%s\n", (a) >= (b) ? "Yes":"No")
#define amodm(a, M) (((a)%M+M)%M)
#define read(s) std::string s;std::cin >> s
#define readL(s) std::string s;getline(std::cin, s)
#define write(s) printf("%s\n", s.c_str())
// #define int lli

using pii = std::pair<int,int>;
const int MOD = 1000000007;
const int mxN = 500100;

signed main() {
    int testCases=1;
    scanf("%d",&testCases);
    
    for (int TC = 1; TC <= testCases; TC++) {
        int a, b, x;
        scanf("%d%d%d",&a,&b,&x);
        if (a >= x) printf("%d %d\n", a-x, b);
        else {
            x -= a;
            b -= x;
            b = std::max(b, 0);
            printf("0 %d\n", b);
        }
    }
    
    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:35:15
Judged At
2025-04-06 15:35:15
Judged By
Score
100
Total Time
59ms
Peak Memory
1.27 MiB