Problem mirrors
User WangZhenxuan
Submission Time 2025-06-20 13:59:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

mirrors.cpp: In function ‘int main()’:
mirrors.cpp:26:17: error: ‘idx’ was not declared in this scope
26 | idx =1
| ^~~
mirrors.cpp:30:17: error: ‘idx’ was not declared in this scope
30 | cout << idx << endl;
| ^~~
mirrors.cpp:31:17: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
31 | int l = ans
| ^~~
| abs
mirrors.cpp:38:9: error: ‘d’ was not declared in this scope
38 | d[r] =0
| ^
mirrors.cpp:38:11: error: ‘r’ was not declared in this scope
38 | d[r] =0
| ^
mirrors.cpp:48:9: error: ‘else’ without a previous ‘if’
48 | else {
| ^~~~
mirrors.cpp:49:13: error: ‘total’ was not declared in this scope
49 | total -= d[l] * 2;
| ^~~~~
mirrors.cpp:54:15: error: