2130 | 2022-12-21 09:59:37 | Timi | Csodálatos Csillagképek | cpp11 | Wrong answer 65/100 | 143ms | 9632 KiB |
#include <iostream>
#include <vector>
using namespace std;
struct Csillag
{
int x, y;
};
int main()
{
int n, i, db=0;
cin>>n;
vector<int> x(200001,0 );
vector<int> y(200001,0);
Csillag a[n];
for (i=0; i<n; i++)
{
cin>>a[i].x>>a[i].y;
x[a[i].x]++;
y[a[i].y]++;
}
for (i=0; i<n; i++)
{
if ((x[a[i].x]-1)*(y[a[i].y]-1)>0)
db=db+(x[a[i].x]-1)*(y[a[i].y]-1);
}
cout<<db;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 4ms | 4724 KiB | ||||
subtask2 | 25/25 | ||||||
2 | Accepted | 3ms | 4924 KiB | ||||
3 | Accepted | 3ms | 5384 KiB | ||||
4 | Accepted | 3ms | 5448 KiB | ||||
5 | Accepted | 3ms | 5652 KiB | ||||
subtask3 | 40/40 | ||||||
6 | Accepted | 4ms | 5860 KiB | ||||
7 | Accepted | 3ms | 5716 KiB | ||||
8 | Accepted | 4ms | 5624 KiB | ||||
9 | Accepted | 4ms | 5564 KiB | ||||
10 | Accepted | 4ms | 5712 KiB | ||||
11 | Accepted | 4ms | 5620 KiB | ||||
subtask4 | 0/35 | ||||||
12 | Wrong answer | 28ms | 6424 KiB | ||||
13 | Accepted | 140ms | 8800 KiB | ||||
14 | Accepted | 67ms | 7452 KiB | ||||
15 | Wrong answer | 41ms | 7524 KiB | ||||
16 | Wrong answer | 59ms | 7872 KiB | ||||
17 | Accepted | 108ms | 8652 KiB | ||||
18 | Accepted | 37ms | 7028 KiB | ||||
19 | Wrong answer | 79ms | 8788 KiB | ||||
20 | Accepted | 136ms | 9360 KiB | ||||
21 | Accepted | 143ms | 9632 KiB |