21292022-12-21 09:56:58TimiCsodálatos Csillagképekcpp11Wrong answer 65/100142ms10288 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(200000,0 );
    vector<int> y(200000,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
2Accepted4ms5052 KiB
3Accepted3ms5256 KiB
4Accepted4ms5580 KiB
5Accepted3ms5772 KiB
subtask340/40
6Accepted4ms5996 KiB
7Accepted4ms6316 KiB
8Accepted4ms6644 KiB
9Accepted4ms6956 KiB
10Accepted4ms7032 KiB
11Accepted4ms6864 KiB
subtask40/35
12Wrong answer28ms7496 KiB
13Accepted141ms9676 KiB
14Accepted65ms8072 KiB
15Wrong answer41ms7988 KiB
16Wrong answer59ms8472 KiB
17Accepted108ms9028 KiB
18Accepted37ms7596 KiB
19Wrong answer79ms9484 KiB
20Accepted136ms10240 KiB
21Accepted142ms10288 KiB