horses.cpp:7:1: error: 'vector' does not name a type
7 | vector<int> xg;
| ^~~~~~
horses.cpp:8:1: error: 'vector' does not name a type
8 | vector<int> yg;
| ^~~~~~
horses.cpp:10:17: error: 'vector' has not been declared
10 | int init(int n, vector<int> x, vector<int> y)
| ^~~~~~
horses.cpp:10:23: error: expected ',' or '...' before '<' token
10 | int init(int n, vector<int> x, vector<int> y)
| ^
horses.cpp: In function 'int init(int, int)':
horses.cpp:13:5: error: 'xg' was not declared in this scope; did you mean 'ng'?
13 | xg = x;
| ^~
| ng
horses.cpp:13:10: error: 'x' was not declared in this scope
13 | xg = x;
| ^
horses.cpp:14:5: error: 'yg' was not declared in this scope; did you mean 'ng'?
14 | yg = y;
| ^~
| ng
horses.cpp:14:10: error: 'y' was not declared in this scope
14 | yg = y;
| ^
horses.cpp:25:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
25 | now = max(now, 0);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from horses.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
horses.cpp:43:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
43 | return mx;
| ^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:48:5: error: 'xg' was not declared in this scope; did you mean 'ng'?
48 | xg[pos] = val;
| ^~
| ng
horses.cpp:59:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
59 | now = max(now, 0);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from horses.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
horses.cpp:65:20: error: 'yg' was not declared in this scope; did you mean 'ng'?
65 | if(mx < pr*yg[i])
| ^~
| ng
horses.cpp:77:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
77 | return mx;
| ^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:82:5: error: 'yg' was not declared in this scope; did you mean 'ng'?
82 | yg[pos] = val;
| ^~
| ng
horses.cpp:87:17: error: 'xg' was not declared in this scope; did you mean 'ng'?
87 | produs*=xg[now];
| ^~
| ng
horses.cpp:93:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
93 | now = max(now, 0);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from horses.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
horses.cpp:98:13: error: 'xg' was not declared in this scope; did you mean 'ng'?
98 | pr*=xg[i];
| ^~
| ng
horses.cpp:108:13: error: 'xg' was not declared in this scope; did you mean 'ng'?
108 | mx*=xg[i];
| ^~
| ng
horses.cpp:111:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | return mx;
| ^~