Problem deforestation
User blob
Submission Time 2023-11-24 15:04:35
Score 0
Max Time N/A
Max Memory N/A

Compile Error

deforestation.cpp: In function ‘int main()’:
deforestation.cpp:6:19: error: wrong number of template arguments (1, should be at least 2)
6 | map <pair<int,int>> trees[N];
| ^~
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from deforestation.cpp:1:
/usr/include/c++/9/bits/stl_map.h:100:11: note: provided for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
100 | class map
| ^~~
deforestation.cpp:8:16: error: request for member ‘first’ in ‘trees’, which is of non-class type ‘int [N]’
8 | cin >> trees.first[i] >> trees.second[i];
| ^~~~~
deforestation.cpp:8:34: error: request for member ‘second’ in ‘trees’, which is of non-class type ‘int [N]’
8 | cin >> trees.first[i] >> trees.second[i];
|