# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
37257 | 2017-12-23T06:40:03 Z | Yusup01 | Star triangles (IZhO11_triangle) | C++14 | 0 ms | 6868 KB |
#include<bits/stdc++.h> using namespace std; long long x[300009],y[300009],jog; int n; map<long long,int> X,Y; int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); freopen("triangle.in","r",stdin); freopen("triangle.out","w",stdout); cin>>n; for(int i=1;i<=n;i++){cin>>x[i]>>y[i]; X[x[i]]++; Y[y[i]]++;} for(int i=1;i<=n;i++) { jog+=(X[x[i]]-1)*(Y[y[i]]-1); } cout<<jog; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 0 ms | 6868 KB | Execution killed because of forbidden syscall [unknown syscall - gap in table] (292) |
2 | Halted | 0 ms | 0 KB | - |