21302022-12-21 09:59:37TimiCsodálatos Csillagképekcpp11Wrong answer 65/100143ms9632 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted4ms4724 KiB
subtask225/25
2Accepted3ms4924 KiB
3Accepted3ms5384 KiB
4Accepted3ms5448 KiB
5Accepted3ms5652 KiB
subtask340/40
6Accepted4ms5860 KiB
7Accepted3ms5716 KiB
8Accepted4ms5624 KiB
9Accepted4ms5564 KiB
10Accepted4ms5712 KiB
11Accepted4ms5620 KiB
subtask40/35
12Wrong answer28ms6424 KiB
13Accepted140ms8800 KiB
14Accepted67ms7452 KiB
15Wrong answer41ms7524 KiB
16Wrong answer59ms7872 KiB
17Accepted108ms8652 KiB
18Accepted37ms7028 KiB
19Wrong answer79ms8788 KiB
20Accepted136ms9360 KiB
21Accepted143ms9632 KiB