Problem basement
User dacashew
Submission Time 2024-02-05 15:01:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

basement.cpp: In function ‘int main()’:
basement.cpp:67:20: error: expected initializer before ‘for’
67 | #define iloop(a,b) for(int i=a;i!=b;i+=(2*((int)(a<b))-1))
| ^~~
basement.cpp:98:5: note: in expansion of macro ‘iloop’
98 | iloop(0,n){
| ^~~~~
basement.cpp:67:32: error: ‘i’ was not declared in this scope
67 | #define iloop(a,b) for(int i=a;i!=b;i+=(2*((int)(a<b))-1))
| ^
basement.cpp:98:5: note: in expansion of macro ‘iloop’
98 | iloop(0,n){
| ^~~~~
basement.cpp:107:13: error: invalid types ‘<unresolved overloaded function type>[long long int]’ for array subscript
107 | prev[x]=0;
| ^
basement.cpp:109:30: error: invalid types ‘<unresolved overloaded function type>[long long int]’ for array subscript
109 | dp[i]=min(dp[i-1]+1,prev[x]);
| ^
b