Jeremiah_

ABC_46 - A - AtCoDeerくんとペンキ / AtCoDeer and Paint Cans

Jun 6th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. #define SYNC ios::sync_with_stdio(0);
  4. #define F first
  5. #define S second
  6. #define endl '\n'
  7.  
  8.  
  9. using namespace std;
  10.  
  11. using ll = long long int;
  12. using ii = pair<int, int>;
  13. using vii = vector<ii>;
  14. using vi = vector<int>;
  15. using graph = vector<vi>;
  16. const int INF = 0x3f3f3f3f;
  17. const int MAXN = 58;
  18. const ll mod = 1000000007;
  19.  
  20.  
  21.  
  22. int main() {
  23.     SYNC
  24.     int a[3], equal = 0;
  25.     for (auto &i : a) {
  26.         cin >> i;
  27.     }
  28.     for (int i = 0; i < 3; ++i) {
  29.         for (int j = 0; j < 3; ++j) {
  30.             if (i == j) continue;
  31.             if (a[i] == a[j]) equal++;
  32.         }
  33.     }
  34.     equal /= 2;
  35.     int ans = 3 - equal;
  36.     if (!ans) ans = 1;
  37.     cout << ans << endl;
  38.  
  39.  
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment