triangle.cpp:11:8: error: wrong number of template arguments (1, should be at least 2)
11 | map<int> X, Y;
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from triangle.cpp:1:
/usr/include/c++/10/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
100 | class map
| ^~~
triangle.cpp: In function 'int main()':
triangle.cpp:17:4: error: invalid types 'int[int]' for array subscript
17 | X[x]++; Y[y]++;
| ^
triangle.cpp:17:12: error: invalid types 'int[int]' for array subscript
17 | X[x]++; Y[y]++;
| ^
triangle.cpp:21:12: error: invalid types 'int[int]' for array subscript
21 | ans += (X[P[i].x] - 1) * (Y[P[i].y] - 1);
| ^
triangle.cpp:21:30: error: invalid types 'int[int]' for array subscript
21 | ans += (X[P[i].x] - 1) * (Y[P[i].y] - 1);
| ^