1718 | 2022-12-01 16:40:44 | Aron | Csodálatos Csillagképek | cpp11 | Time limit exceeded 65/100 | 1.077s | 14544 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;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1808 KiB | ||||
subtask2 | 25/25 | ||||||
2 | Accepted | 2ms | 2068 KiB | ||||
3 | Accepted | 2ms | 2268 KiB | ||||
4 | Accepted | 2ms | 2508 KiB | ||||
5 | Accepted | 2ms | 2868 KiB | ||||
subtask3 | 40/40 | ||||||
6 | Accepted | 4ms | 2772 KiB | ||||
7 | Accepted | 4ms | 2836 KiB | ||||
8 | Accepted | 10ms | 3124 KiB | ||||
9 | Accepted | 14ms | 3416 KiB | ||||
10 | Accepted | 9ms | 3588 KiB | ||||
11 | Accepted | 9ms | 3544 KiB | ||||
subtask4 | 0/35 | ||||||
12 | Time limit exceeded | 1.042s | 5760 KiB | ||||
13 | Time limit exceeded | 1.062s | 13620 KiB | ||||
14 | Time limit exceeded | 1.054s | 8212 KiB | ||||
15 | Time limit exceeded | 1.065s | 7700 KiB | ||||
16 | Time limit exceeded | 1.062s | 9668 KiB | ||||
17 | Time limit exceeded | 1.075s | 11528 KiB | ||||
18 | Time limit exceeded | 1.07s | 5872 KiB | ||||
19 | Time limit exceeded | 1.075s | 12124 KiB | ||||
20 | Time limit exceeded | 1.046s | 13752 KiB | ||||
21 | Time limit exceeded | 1.077s | 14544 KiB |