21312022-12-21 10:03:28TimiCsodálatos Csillagképekcpp11Wrong answer 65/100150ms10468 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)>0)&&((y[a[i].y]-1)>0))
            db=db+(x[a[i].x]-1)*(y[a[i].y]-1);
    }
    cout<<db;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted4ms4728 KiB
subtask225/25
2Accepted4ms5048 KiB
3Accepted3ms5240 KiB
4Accepted4ms5572 KiB
5Accepted3ms5780 KiB
subtask340/40
6Accepted4ms5856 KiB
7Accepted4ms6048 KiB
8Accepted4ms6252 KiB
9Accepted4ms6368 KiB
10Accepted4ms6684 KiB
11Accepted4ms6752 KiB
subtask40/35
12Wrong answer28ms7552 KiB
13Accepted143ms9800 KiB
14Accepted68ms8460 KiB
15Wrong answer43ms8552 KiB
16Wrong answer59ms8924 KiB
17Accepted119ms9608 KiB
18Accepted37ms8236 KiB
19Wrong answer79ms9944 KiB
20Accepted150ms10464 KiB
21Accepted144ms10468 KiB