Main.cc: In function ‘void calc(long long int)’:
Main.cc:28:21: error: ‘i’ was not declared in this scope
if(a[1]%2==0&&a[i]) tmp--;
^
Main.cc: In function ‘void calc1(long long int, long long int)’:
Main.cc:34:9: warning: unused variable ‘lenl’ [-Wunused-variable]
int lenl=(tot-dif+1)>>1,lenr=(tot+1)>>1;
^~~~
Main.cc:34:29: warning: unused variable ‘lenr’ [-Wunused-variable]
int lenl=(tot-dif+1)>>1,lenr=(tot+1)>>1;
^~~~
Main.cc: In function ‘int main()’:
Main.cc:111:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&n);
~~~~~^~~~~~~~~~~