Problem paint
User yongteckrice
Submission Time 2023-07-20 16:48:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

paint.cpp: In function ‘int main()’:
paint.cpp:40:24: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int> >, std::tuple<int, int> >::value_type’ {aka ‘std::tuple<int, int>’} and ‘int’)
40 | spending += thingy[i][1] + thingy[i][0]*i;
| ^
paint.cpp:40:39: error: no match for ‘operator[]’ (operand types are ‘__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int> >, std::tuple<int, int> >::value_type’ {aka ‘std::tuple<int, int>’} and ‘int’)
40 | spending += thingy[i][1] + thingy[i][0]*i;
| ^