Problem vectorindexing
User Magenta
Submission Time 2026-06-24 09:46:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

vectorindexing.cpp: In function ‘int main()’:
vectorindexing.cpp:9:22: error: ‘n’ was not declared in this scope
9 | for (int i = 1; i < n; i++)
| ^
vectorindexing.cpp:15:23: error: ‘n’ was not declared in this scope
15 | for (int i = 1; i <= n; i++)
| ^
vectorindexing.cpp:17:22: error: expected ‘}’ at end of input
17 | cout << X[i] << "\n";
| ^
vectorindexing.cpp:16:1: note: to match this ‘{’
16 | {
| ^
vectorindexing.cpp:17:22: error: expected ‘}’ at end of input
17 | cout << X[i] << "\n";
| ^
vectorindexing.cpp:4:15: note: to match this ‘{’
4 | signed main() {
| ^