Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- typedef long long int ll;
- int main() {
- int n, count = 0;
- cin >> n;
- for (int i = 0; i < n; i++) {
- int c;
- cin >> c;
- if (c) count++;
- }
- cout << min(count, n - count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement