/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 3ms 540.0 KiB
#2 Wrong Answer 34ms 564.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{

    int t;
    cin >> t;
    while (t--)
    {

        int a, b, c;
        cin >> a >> b >> c;
        if (a == 0 && b == 0 && c == 0)
        {
            cout << 0;
            continue;
        }
        if (a == b || a == c || b == c)
        {
            cout << 1;
            continue;
        }
        vector<int> x = {a, b, c};
        sort(x.begin(), x.end());
        int r = abs(x[0] - x[1]);
        cout << x[2] / r << endl;
    }
    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:10:17
Judged At
2024-11-11 03:24:36
Judged By
Score
0
Total Time
34ms
Peak Memory
564.0 KiB