Main.cc: In function ‘int main()’:
Main.cc:32:4: error: ‘cnt’ was not declared in this scope
cnt+=(j-k-1)*a[j]-tmp;
^~~
Main.cc:32:4: note: suggested alternative: ‘int’
cnt+=(j-k-1)*a[j]-tmp;
^~~
int
Main.cc:37:8: error: ‘cnt’ was not declared in this scope
cout<