Wrong Answer
Code
#include <bits/stdc++.h>
using namespace std;
void solution() {
int A, B, C;
cin >> A >> B >> C;
int arr[3] = {A, B, C};
sort(arr, arr + 3);
if (arr[0] == arr[1] && arr[1] == arr[2]) {
cout << 0 << "\n";
} else if (arr[0] == arr[1] || arr[1] == arr[2]) {
cout << 1 << "\n";
} else {
cout << 2 << "\n";
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin >> T;
while (T--) {
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 16:07:55
- Judged At
- 2024-11-11 03:24:43
- Judged By
- Score
- 10
- Total Time
- 5ms
- Peak Memory
- 576.0 KiB