# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
889453 | 2023-12-19T18:37:38 Z | Kakarot | Star triangles (IZhO11_triangle) | C++ | 1 ms | 348 KB |
#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 && x != y); } cout << ans; } int main() { setIO(); solve(); return 0; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |