Problem mining
User penguinzzz
Submission Time 2024-04-12 15:08:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mining.cpp: In function ‘int main()’:
mining.cpp:39:48: error: request for member ‘first’ in ‘grid[a.std::pair<int, int>::first][a.std::pair<int, int>::second]’, which is of non-class type ‘std::pair<int, int> [133]’
39 | grid[ny][nx][b] = {grid[a.first][a.second].first + 1, b};
| ^~~~~
mining.cpp:39:60: error: no match for ‘operator=’ (operand types are ‘std::pair<int, int>’ and ‘<brace-enclosed initializer list>’)
39 | grid[ny][nx][b] = {grid[a.first][a.second].first + 1, b};
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from mining.cpp:1:
/usr/include/c++/9/bits/s