17182022-12-01 16:40:44AronCsodálatos Csillagképekcpp11Time limit exceeded 65/1001.077s14544 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);
    }

    /*for(int i = 0; i < N; i++){
        cout << XY[i][0] << XY[i][1];
    }*/

    int GotIt = 0;
    vector<vector<int>> Confirmed;
    for(int i = 0; i < N; i++){
        for(int j = 0; j < N; j++){
            //cout << XY[i][0] << ' ' << XY[j][0] << ' ' << XY[i][1] << ' ' << XY[i][0] << '\n';
            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
1Accepted3ms1808 KiB
subtask225/25
2Accepted2ms2068 KiB
3Accepted2ms2268 KiB
4Accepted2ms2508 KiB
5Accepted2ms2868 KiB
subtask340/40
6Accepted4ms2772 KiB
7Accepted4ms2836 KiB
8Accepted10ms3124 KiB
9Accepted14ms3416 KiB
10Accepted9ms3588 KiB
11Accepted9ms3544 KiB
subtask40/35
12Time limit exceeded1.042s5760 KiB
13Time limit exceeded1.062s13620 KiB
14Time limit exceeded1.054s8212 KiB
15Time limit exceeded1.065s7700 KiB
16Time limit exceeded1.062s9668 KiB
17Time limit exceeded1.075s11528 KiB
18Time limit exceeded1.07s5872 KiB
19Time limit exceeded1.075s12124 KiB
20Time limit exceeded1.046s13752 KiB
21Time limit exceeded1.077s14544 KiB