/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 332.0 KiB
#2 Wrong Answer 9ms 576.0 KiB
#3 Wrong Answer 9ms 564.0 KiB

Code

#include <bits/stdc++.h>

#pragma GCC optimize("Ofast")
using namespace std;

void solve(int cs) {
  map<int,int> cnt;
  for (int i = 0; i < 3; i++) {
    int x;
    cin >> x;
    cnt[x] += 1;
  }
  if (cnt.size() == 1) cout << "0\n";
  else if (cnt.size() == 3) cout << "2\n";
  else {
    // if (cnt.begin() -> second == 1) {
    //   cout << "2\n";
    // } else {
    //   cout << "1\n";
    // }
    cout << 1 << "\n";
  }
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int tc = 1;
  cin >> tc;
  for (int cs = 1; cs <= tc; cs++) {
    solve(cs);
  }
  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:37:15
Judged At
2024-11-11 03:25:47
Judged By
Score
10
Total Time
9ms
Peak Memory
576.0 KiB