Problem hungrycats
User Zachareeeee
Submission Time 2024-12-02 13:46:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hungrycats.cpp: In function ‘int main()’:
hungrycats.cpp:11:17: error: expected ‘;’ before ‘if’
11 | v.push_back(x)
| ^
| ;
12 | if (x>0){
| ~~
hungrycats.cpp:15:3: error: ‘else’ without a previous ‘if’
15 | else{
| ^~~~
hungrycats.cpp:22:8: error: ‘class std::vector<long int>’ has no member named ‘is_sorted’
22 | if(v.is_sorted(v.begin(), v.end()){
| ^~~~~~~~~
hungrycats.cpp:22:37: error: expected ‘)’ before ‘{’ token
22 | if(v.is_sorted(v.begin(), v.end()){
| ~ ^
| )
hungrycats.cpp:27:6: error: expected primary-expression before ‘}’ token
27 | }
| ^
hungrycats.cpp:27:6: error: expected ‘}’ at end of input
hungrycats.cpp:3:11: note: to match this ‘{’
3 | int main(){
| ^