Problem pancake
User 123456789
Submission Time 2023-11-22 18:11:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

pancake.cpp: In function ‘int32_t main()’:
pancake.cpp:15:30: error: cannot convert ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’ to ‘long long int*’ in assignment
15 | max = max_element(pan.begin(), pan.end());
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >
pancake.cpp:16:21: error: no match for ‘operator==’ (operand types are ‘long long int*’ and ‘std::vector<long long int>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >’})
16 | if (max == pan.begin()) pan.erase(pan.begin());
| ~~~ ^~ ~~~~~~~~~~~
| | |
| long long int* std::vector<long long int>::iterator {aka __gn