1553 | 2022-11-24 12:01:20 | 1478 | Csodálatos Csillagképek | cpp11 | Wrong answer 65/100 | 230ms | 41856 KiB |
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
vector<vector<int>> x(200001);
vector<vector<int>> y(200001);
int main()
{
int n;
cin>>n;
int a, b;
vector<int> xek(n+1);
vector<int> yok(n+1);
for(int i=1; i<=n; i++)
{
cin>>a>>b;
x[a].push_back(i);
y[b].push_back(i);
xek[i] = a;
yok[i] = b;
}
int db=0;
for(int i=1; i<=n; i++)
{
if(x[xek[i]].size() && y[yok[i]].size())
{
db+=(x[xek[i]].size()-1)*(y[yok[i]].size()-1);
}
}
cout<<db;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 9ms | 20672 KiB | ||||
subtask2 | 25/25 | ||||||
2 | Accepted | 8ms | 20808 KiB | ||||
3 | Accepted | 8ms | 20800 KiB | ||||
4 | Accepted | 8ms | 20808 KiB | ||||
5 | Accepted | 9ms | 21068 KiB | ||||
subtask3 | 40/40 | ||||||
6 | Accepted | 9ms | 21272 KiB | ||||
7 | Accepted | 10ms | 21528 KiB | ||||
8 | Accepted | 9ms | 21416 KiB | ||||
9 | Accepted | 8ms | 21668 KiB | ||||
10 | Accepted | 8ms | 21616 KiB | ||||
11 | Accepted | 10ms | 21888 KiB | ||||
subtask4 | 0/35 | ||||||
12 | Wrong answer | 35ms | 23824 KiB | ||||
13 | Accepted | 230ms | 41012 KiB | ||||
14 | Accepted | 108ms | 33160 KiB | ||||
15 | Wrong answer | 50ms | 26240 KiB | ||||
16 | Wrong answer | 68ms | 27280 KiB | ||||
17 | Accepted | 164ms | 37940 KiB | ||||
18 | Accepted | 61ms | 28560 KiB | ||||
19 | Wrong answer | 89ms | 28568 KiB | ||||
20 | Accepted | 206ms | 40948 KiB | ||||
21 | Accepted | 212ms | 41856 KiB |