Problem lvm
User Yizhou
Submission Time 2024-05-30 20:16:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lvm.cpp: In function ‘int main()’:
lvm.cpp:9:23: error: request for member ‘first’ in ‘arr’, which is of non-class type ‘std::pair<std::__cxx11::basic_string<char>, int> [1010]’
9 | int *arr_pointer=arr.first;
| ^~~~~
lvm.cpp:18:23: error: invalid types ‘std::pair<std::__cxx11::basic_string<char>, int> [1010][int*]’ for array subscript
18 | while(arr[arr_pointer].first!="DONE"){
| ^
lvm.cpp:19:21: error: invalid types ‘std::pair<std::__cxx11::basic_string<char>, int> [1010][int*]’ for array subscript
19 | if(arr[arr_pointer].first=="PUSH"){
| ^
lvm.cpp:20:26: error: invalid types ‘std::pair<std::__cxx11::basic_string<char>, int> [1010][int*]’ for array subscript
20 | s.push(arr[arr_pointer].second);
| ^
lvm.cpp:22:27: error: invalid types ‘std::pair<std::__cxx11::bas