foo.c: In function 'main':
foo.c:6:2: error: variable-sized object may not be initialized
int a[n],c[n]={};
^~~
foo.c:12:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
{if(j=k) continue;
^
foo.c:19:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(a[n-1]=a[p]) break;
^
foo.c:20:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
else if(p=0) c[n-1]=a[n-1];
^
foo.c:5:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^~~~~~~~~~~~~~
foo.c:8:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
^~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务