This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int main()
{
int n, k = 0;
cin >> n;
vector<int> a(3);
for(int i = 0; i < n * 2; i++)
{
int x, y;
cin >> x >> y;
x = max(1, min(n, x));
y = max(1, min(2, y));
a[y]++;
}
int x1 = a[1] - n;
int x2 = a[2] - n;
k += abs(x1) + abs(x2);
cout << k;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |