# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
889454 | Kakarot | Star triangles (IZhO11_triangle) | C++98 | 0 ms | 0 KiB |
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>
#define ii unordered_map<int,int>
#define vii vector<pair<int,int>>
using namespace std;
void setIO() {
cin.tie(0)->sync_with_stdio(0);
}
void solve() {
int n,ans = 0;
cin >> n;
ii fx,fy;
while(n--) {
int x,y;
cin >> x >> y;
++fx[x];
++fy[y];
ans += (fx[x] >= 2 && fy[y] >= 2);
}
cout << ans;
}
int main() {
setIO();
solve();
return 0;
}