divide.cpp:9:16: error: expected initializer before numeric constant
9 | const int MAXN 100100;
| ^~~~~~
divide.cpp:10:7: error: 'MAXN' was not declared in this scope
10 | int x[MAXN], g[MAXN], d[MAXN], n;
| ^~~~
divide.cpp:10:16: error: 'MAXN' was not declared in this scope
10 | int x[MAXN], g[MAXN], d[MAXN], n;
| ^~~~
divide.cpp:10:25: error: 'MAXN' was not declared in this scope
10 | int x[MAXN], g[MAXN], d[MAXN], n;
| ^~~~
divide.cpp:11:9: error: 'MAXN' was not declared in this scope
11 | int prg[MAXN], prd[MAXN], mn[MAXN];
| ^~~~
divide.cpp:11:20: error: 'MAXN' was not declared in this scope
11 | int prg[MAXN], prd[MAXN], mn[MAXN];
| ^~~~
divide.cpp:11:30: error: 'MAXN' was not declared in this scope
11 | int prg[MAXN], prd[MAXN], mn[MAXN];
| ^~~~
divide.cpp: In function 'long long int search(long long int, long long int)':
divide.cpp:18:10: error: 'mn' was not declared in this scope; did you mean 'm'?
18 | if(mn[m] <= E) r = m;
| ^~
| m
divide.cpp:15:23: warning: unused variable 'pos' [-Wunused-variable]
15 | int l = 1, r = i, pos = 1;
| ^~~
divide.cpp: In function 'int main()':
divide.cpp:30:14: error: 'x' was not declared in this scope
30 | cin >> x[i] >> g[i] >> d[i];
| ^
divide.cpp:30:22: error: 'g' was not declared in this scope
30 | cin >> x[i] >> g[i] >> d[i];
| ^
divide.cpp:30:30: error: 'd' was not declared in this scope
30 | cin >> x[i] >> g[i] >> d[i];
| ^
divide.cpp:32:5: error: 'mn' was not declared in this scope; did you mean 'n'?
32 | mn[0] = 1e18;
| ^~
| n
divide.cpp:34:7: error: 'prg' was not declared in this scope
34 | prg[i] = g[i] + prg[i-1];
| ^~~
divide.cpp:34:16: error: 'g' was not declared in this scope
34 | prg[i] = g[i] + prg[i-1];
| ^
divide.cpp:35:7: error: 'prd' was not declared in this scope
35 | prd[i] = d[i] + prd[i-1];
| ^~~
divide.cpp:35:16: error: 'd' was not declared in this scope
35 | prd[i] = d[i] + prd[i-1];
| ^
divide.cpp:36:39: error: 'x' was not declared in this scope
36 | mn[i] = min(mn[i-1], prd[i-1] - x[i]);
| ^