17212022-12-01 16:43:09AronCsodálatos Csillagképekcpp11Time limit exceeded 65/1001.1s14540 KiB
#include <iostream>
#include <vector>

using namespace std;
int main()
{
    long int N;
    cin >> N;

    vector<vector<int>> XY(N);
    int seged;
    for (int i = 0; i < N; i++){
        cin >> seged;
        XY[i].push_back(seged);
        cin >> seged;
        XY[i].push_back(seged);

        XY[i].push_back(0);
    }

    int GotIt = 0;
    for(int i = 0; i < N; i++){
        for(int j = 0; j < N; j++){
            if((XY[i][0] == XY[j][0]) && (XY[i][1] != XY[j][1]))
                XY[i][2]++;
        }

        if(XY[i][2] != 0){
            for(int j = 0; j < N; j++){
            if((XY[i][1] == XY[j][1]) && (XY[i][0] != XY[j][0]))
                GotIt += XY[i][2];
            }
        }
    }

    cout << GotIt;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1816 KiB
subtask225/25
2Accepted2ms2008 KiB
3Accepted2ms2264 KiB
4Accepted2ms2488 KiB
5Accepted2ms2652 KiB
subtask340/40
6Accepted4ms3020 KiB
7Accepted4ms3088 KiB
8Accepted9ms3320 KiB
9Accepted13ms3480 KiB
10Accepted8ms3440 KiB
11Accepted8ms3448 KiB
subtask40/35
12Time limit exceeded1.1s5588 KiB
13Time limit exceeded1.074s13356 KiB
14Time limit exceeded1.07s7572 KiB
15Time limit exceeded1.067s7364 KiB
16Time limit exceeded1.05s9572 KiB
17Time limit exceeded1.059s11296 KiB
18Time limit exceeded1.05s5536 KiB
19Time limit exceeded1.062s11980 KiB
20Time limit exceeded1.062s13880 KiB
21Time limit exceeded1.07s14540 KiB