Problem collectmushrooms6
User fwaeh
Submission Time 2026-03-05 15:51:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

collectmushrooms6.cpp: In function ‘int main()’:
collectmushrooms6.cpp:46:20: error: no match for ‘operator+=’ (operand types are ‘std::vector<std::vector<int> >’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’})
46 | if (i > 0) grid += grid[i - 1][j];
collectmushrooms6.cpp:47:17: error: no match for ‘operator+=’ (operand types are ‘std::vector<std::vector<int> >’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’})
47 | if(j>0) grid += grid[i][j-1];
collectmushrooms6.cpp:50:10: error: no match for ‘operator-=’ (operand types are ‘std::vector<std::vector<int> >’ and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’})
50 | grid -= grid[i - 1][j - 1];