/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 536.0 KiB
#2 Wrong Answer 5ms 568.0 KiB
#3 Wrong Answer 5ms 576.0 KiB
#4 Wrong Answer 4ms 560.0 KiB
#5 Wrong Answer 4ms 580.0 KiB
#6 Accepted 4ms 580.0 KiB
#7 Accepted 4ms 580.0 KiB
#8 Accepted 4ms 584.0 KiB
#9 Wrong Answer 4ms 580.0 KiB
#10 Wrong Answer 4ms 588.0 KiB

Code

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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef double dl;

#define endl '\n'
#define PB push_back
#define F first
#define S second
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define sz(x) (int)x.size()

const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 10000007

#define mem(a,b) memset(a, b, sizeof(a) )
#define sqr(a) ((a) * (a))

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);
#define file() freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);

#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)
void faltu () { cerr << endl; }
template < typename T, typename ... hello> void faltu( T arg, const hello &... rest) { cerr << arg << ' '; faltu(rest...); }

ll gcd ( ll a, ll b ) { return __gcd ( a, b ); }
ll lcm ( ll a, ll b ) { return a * ( b / gcd ( a, b ) ); }



int main(){
    optimize();
    int t;
    cin >> t;
    for(int tc=1;tc<=t;tc++){
        
        vector<int>v(3);
        for(int i=0;i<3;i++)cin>>v[i];

        sort(v.begin(),v.end());
        int x = v[1] - v[0];
        int y = v[2] - v[1];
        if(x==0 && y==0){
            cout<<0<<endl;
            continue;
        }
        if(x==0 || y==0){
            cout<<1<<endl;
        }
        else{
            cout<<2<<endl;
        }
        
    }
}

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:47:37
Judged At
2024-10-03 13:36:57
Judged By
Score
40
Total Time
5ms
Peak Memory
588.0 KiB