Wrong Answer
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";
}
}
}
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:36:22
- Judged At
- 2024-11-11 03:25:47
- Judged By
- Score
- 10
- Total Time
- 5ms
- Peak Memory
- 584.0 KiB