# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
476227 | 2021-09-25T12:47:37 Z | kkk | 별들과 삼각형 (IZhO11_triangle) | C++14 | 17 ms | 460 KB |
#include<cstring> #include<iostream> #define endl '\n' using namespace std; long long a[10000000], b[10000000], x[10000000], y[10000000], n, m; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long i,j, br=0; cin>>n; for(i=0;i<n;i++) { cin>>x[i]>>y[i]; a[x[i]]++; b[y[i]]++; } for(i=0;i<n;i++) { br+=(a[x[i]]-1)*(b[y[i]]-1); } cout<<br<<endl; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 332 KB | Output is correct |
2 | Correct | 1 ms | 332 KB | Output is correct |
3 | Correct | 0 ms | 332 KB | Output is correct |
4 | Correct | 0 ms | 332 KB | Output is correct |
5 | Correct | 0 ms | 332 KB | Output is correct |
6 | Correct | 0 ms | 332 KB | Output is correct |
7 | Correct | 0 ms | 332 KB | Output is correct |
8 | Correct | 1 ms | 332 KB | Output is correct |
9 | Correct | 1 ms | 332 KB | Output is correct |
10 | Correct | 1 ms | 460 KB | Output is correct |
11 | Runtime error | 17 ms | 460 KB | Execution killed with signal 11 |
12 | Halted | 0 ms | 0 KB | - |