Problem devour
User 2Princes1Lance
Submission Time 2023-11-27 15:54:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

devour.cpp: In function ‘int main()’:
devour.cpp:3:10: error: ‘vector’ is not a member of ‘std’
3 | std::vector<int> monsters;
| ^~~~~~
devour.cpp:1:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
+++ |+#include <vector>
1 | int main(){
devour.cpp:3:17: error: expected primary-expression before ‘int’
3 | std::vector<int> monsters;
| ^~~
devour.cpp:4:10: error: ‘cin’ is not a member of ‘std’
4 | std::cin >> N >> K;
| ^~~
devour.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | int main(){
devour.cpp:5:5: error: ‘monsters’ was not declared in this scope
5 | monsters.assign(N, 0);
| ^~~~~~~~
devour.cpp:6:10: error: ‘vector’ is not a member of