/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 324.0 KiB
#2 Wrong Answer 5ms 536.0 KiB
#3 Wrong Answer 5ms 588.0 KiB

Code

/**
 *    author:  pollob18
 *    created: July 2024
**/
#include<bits/stdc++.h>
#define ll    long long int
#define yes   "YES"
#define no    "NO"
#define nl    "\n"
using namespace std;

void solution()
{
    int a,b,c;
    cin>>a>>b>>c;
    int mx=max({a,b,c});
    int mn=min({a,b,c});
    int x=a+b+c-mx-mn;
    if(mx==mn && mx==x){
        cout<<0<<nl;
    }
    else if(mx==x || mn==x || mx==mn){
        cout<<1<<nl;
    }
    else{
        cout<<2<<nl;
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int tc;
    cin>>tc;
    while(tc--)
    {
        solution();
    }
    return 0;

}

Information

Submit By
Type
Submission
Problem
P1061 Bring equality
Contest
Brain Booster #4
Language
C++20 (G++ 13.2.0)
Submit At
2024-07-14 16:00:28
Judged At
2024-11-11 03:25:02
Judged By
Score
10
Total Time
5ms
Peak Memory
588.0 KiB