money.cpp: In function 'int main()':
money.cpp:33:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
while(last<i) upd[a[last++]];
^
money.cpp:33:31: warning: value computed is not used [-Wunused-value]
money.cpp:33:31: warning: value computed is not used [-Wunused-value]
money.cpp:26:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
money.cpp:27:40: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=0;i<n;i++) scanf("%d",&a[i]);
^