/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Wrong Answer 2ms 532.0 KiB
#3 Wrong Answer 4ms 440.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--){
        int a,b,x;
        cin>>a>>b>>x;
        int A,B;
        if(a+b==x){
            cout<<0<<" "<<0<<"\n";
        }
        
        else if(a<b&&a>x){
           cout<<a-x<<" "<<b<<"\n";
        }
        else if(a<b&&a<x){
            cout<<0<<" "<<b-(x-a)<<"\n";
        }
        else if(a>b&&a>x){
            cout<<a-x<<" "<<b<<"\n";
        }
        else if(a>b&&a<x){
            cout<<0<<" "<<b-(x-a)<<"\n";
        }
    }
}

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:11:23
Judged At
2025-04-06 16:11:23
Judged By
Score
10
Total Time
4ms
Peak Memory
536.0 KiB