Wrong Answer
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){
cout<<0<<nl;
}
else{
if(x==mn || x==mx){
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 15:55:07
- Judged At
- 2024-11-11 03:25:14
- Judged By
- Score
- 10
- Total Time
- 10ms
- Peak Memory
- 588.0 KiB