horses.cpp:10:6: error: expected primary-expression before 'v'
10 | ll v, x, y; double dx, dy, dv;
| ^
horses.cpp:10:6: error: expected '}' before 'v'
horses.cpp:9:9: note: to match this '{'
9 | int node{
| ^
horses.cpp:11:1: error: expected declaration before '}' token
11 | }t[4 * 500005];
| ^
horses.cpp:11:2: error: 't' does not name a type
11 | }t[4 * 500005];
| ^
horses.cpp:13:1: error: 'node' does not name a type
13 | node merge(node a, node b){
| ^~~~
horses.cpp:24:1: error: 'node' does not name a type
24 | node upd(int i, int l, int r, int ps, ll vx, ll vy){
| ^~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:39:30: error: 'update' was not declared in this scope; did you mean 'updateY'?
39 | for (int i = 0; i < N; i++) update(1, 0, n - 1, i, X[i], Y[i]);
| ^~~~~~
| updateY
horses.cpp:40:9: error: 't' was not declared in this scope
40 | return t[1].v;
| ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:44:2: error: 'update' was not declared in this scope; did you mean 'updateY'?
44 | update(1, 0, n - 1, pos, val, 0);
| ^~~~~~
| updateY
horses.cpp:45:9: error: 't' was not declared in this scope
45 | return t[1].v;
| ^
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:49:2: error: 'update' was not declared in this scope; did you mean 'updateY'?
49 | update(1, 0, n - 1, pos, 0, val);
| ^~~~~~
| updateY
horses.cpp:50:9: error: 't' was not declared in this scope
50 | return t[1].v;
| ^