lightningrod.cpp:18:24: error: 'vi' has not been declared
18 | int MinPyramids(int N, vi X, vi Y)
| ^~
lightningrod.cpp:18:30: error: 'vi' has not been declared
18 | int MinPyramids(int N, vi X, vi Y)
| ^~
lightningrod.cpp: In function 'int MinPyramids(int, int, int)':
lightningrod.cpp:21:5: error: 'vi' was not declared in this scope
21 | vi T1(N + 1), T2(N + 1);
| ^~
lightningrod.cpp:23:9: error: 'T1' was not declared in this scope; did you mean 'y1'?
23 | T1[N - i] = X[i] - Y[i], T2[i + 1] = X[i] + Y[i];
| ^~
| y1
lightningrod.cpp:23:22: error: invalid types 'int[int]' for array subscript
23 | T1[N - i] = X[i] - Y[i], T2[i + 1] = X[i] + Y[i];
| ^
lightningrod.cpp:23:29: error: invalid types 'int[int]' for array subscript
23 | T1[N - i] = X[i] - Y[i], T2[i + 1] = X[i] + Y[i];
| ^
lightningrod.cpp:23:34: error: 'T2' was not declared in this scope
23 | T1[N - i] = X[i] - Y[i], T2[i + 1] = X[i] + Y[i];
| ^~
lightningrod.cpp:23:47: error: invalid types 'int[int]' for array subscript
23 | T1[N - i] = X[i] - Y[i], T2[i + 1] = X[i] + Y[i];
| ^
lightningrod.cpp:23:54: error: invalid types 'int[int]' for array subscript
23 | T1[N - i] = X[i] - Y[i], T2[i + 1] = X[i] + Y[i];
| ^
lightningrod.cpp:26:13: error: 'T1' was not declared in this scope; did you mean 'y1'?
26 | T1[i + (i & -i)] = min(T1[i + (i & -i)], T1[i]), T2[i + (i & -i)] = max(T2[i + (i & -i)], T2[i]);
| ^~
| y1
lightningrod.cpp:26:62: error: 'T2' was not declared in this scope
26 | T1[i + (i & -i)] = min(T1[i + (i & -i)], T1[i]), T2[i + (i & -i)] = max(T2[i + (i & -i)], T2[i]);
| ^~
lightningrod.cpp:31:26: error: 'T1' was not declared in this scope; did you mean 'y1'?
31 | mn = min(mn, T1[j]);
| ^~
| y1
lightningrod.cpp:33:26: error: 'T2' was not declared in this scope
33 | mx = max(mx, T2[j]);
| ^~
lightningrod.cpp:34:19: error: invalid types 'int[int]' for array subscript
34 | if (mx < X[i] + Y[i] && mn > X[i] - Y[i])
| ^
lightningrod.cpp:34:26: error: invalid types 'int[int]' for array subscript
34 | if (mx < X[i] + Y[i] && mn > X[i] - Y[i])
| ^
lightningrod.cpp:34:39: error: invalid types 'int[int]' for array subscript
34 | if (mx < X[i] + Y[i] && mn > X[i] - Y[i])
| ^
lightningrod.cpp:34:46: error: invalid types 'int[int]' for array subscript
34 | if (mx < X[i] + Y[i] && mn > X[i] - Y[i])
| ^
lightningrod.cpp: In function 'int main()':
lightningrod.cpp:48:25: error: cannot convert 'std::vector<int>' to 'int'
48 | int ans= MinPyramids(N,X,Y);
| ^
| |
| std::vector<int>
lightningrod.cpp:18:27: note: initializing argument 2 of 'int MinPyramids(int, int, int)'
18 | int MinPyramids(int N, vi X, vi Y)
| ~~~^