| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 89794 | Atashka01 | 별들과 삼각형 (IZhO11_triangle) | C++11 | 2 ms | 580 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//Euzibillahiminesseytanirracim Bismillahirrahmanirrahim
/*
ID:
TASK:
LANG: C++
*/
#include <bits/stdc++.h>
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define mp make_pair
#define PII pair<int,int>
#define inf 1000000001
using namespace std;
map<int,int> m , p;
int n, x[303001], y[303001], ans;
int main()
{
	
	cin>>n;
	
	for(int i=1;i<=n;i++){
		
		cin>>x[i]>>y[i];
		
		m[x[i]]++;
		p[y[i]]++;
		
	}
	
	
	for(int i=1;i<=n;i++){
		
		ans += (m[x[i]] - 1)*(m[y[i]] - 1);
		
	}
	
	cout<<ans<<"\n";
	
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
