# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
707026 | 2023-03-08T10:01:59 Z | ToroTN | Star triangles (IZhO11_triangle) | C++14 | 111 ms | 7456 KB |
#include<bits/stdc++.h> using namespace std; #define ll long long ll n,x[300005],y[30005],cnt=0; map<ll,ll> mp1,mp2; int main() { scanf("%lld",&n); for(int i=1;i<=n;i++) { scanf("%lld%lld",&x[i],&y[i]); ++mp1[x[i]],++mp2[y[i]]; } for(int i=1;i<=n;i++) { cnt+=(mp1[x[i]]-1)*(mp2[y[i]]-1); } printf("%lld\n",cnt); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 312 KB | Output is correct |
2 | Correct | 1 ms | 312 KB | Output is correct |
3 | Correct | 1 ms | 312 KB | Output is correct |
4 | Correct | 1 ms | 308 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 308 KB | Output is correct |
8 | Correct | 1 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 312 KB | Output is correct |
10 | Correct | 1 ms | 340 KB | Output is correct |
11 | Correct | 1 ms | 340 KB | Output is correct |
12 | Correct | 7 ms | 1168 KB | Output is correct |
13 | Correct | 7 ms | 1244 KB | Output is correct |
14 | Correct | 10 ms | 1704 KB | Output is correct |
15 | Incorrect | 111 ms | 7456 KB | Output isn't correct |
16 | Halted | 0 ms | 0 KB | - |