Problem conversations_easy
User JhoCyber
Submission Time 2025-01-15 18:19:30
Score 0
Max Time N/A
Max Memory N/A

Compile Error

conversations_easy.cpp: In function ‘int32_t main()’:
conversations_easy.cpp:20:27: error: no match for ‘operator[]’ (operand types are ‘std::stack<long long int>’ and ‘long long int’)
20 | if(indexes[i]==y){
| ^
conversations_easy.cpp:21:29: error: ‘class std::stack<long long int>’ has no member named ‘erase’
21 | indexes.erase(i);
| ^~~~~
conversations_easy.cpp:32:13: error: expected ‘}’ before ‘else’
32 | else final_output.push_back(indexes.top());
| ^~~~
conversations_easy.cpp:30:32: note: to match this ‘{’
30 | if(indexes.empty()){
| ^
conversations_easy.cpp: At global scope:
conversations_easy.cpp:36:5: error: ‘cout’ does not name a type
36 | cout << final_output;
| ^~~~
conversations_easy.cpp:37:1: error: