Problem sumstack
User SY
Submission Time 2025-06-17 23:18:46
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumstack.cpp: In function ‘int main()’:
sumstack.cpp:16:31: error: request for member ‘c’ in ‘ps.std::vector<long long int>::back()’, which is of non-class type ‘__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type’ {aka ‘long long int’}
16 | ps.push_back(x + ps.back().c);
| ^