0_0_33465449_30370.c:21:5: error: variably modified 'a' at file scope
int a[maxn],count[maxa];
^
0_0_33465449_30370.c:21:13: error: variably modified 'count' at file scope
int a[maxn],count[maxa];
^
0_0_33465449_30370.c:22:5: error: variably modified 'ans' at file scope
int ans[maxn],ansnum;
^
0_0_33465449_30370.c: In function 'main':
0_0_33465449_30370.c:30:6: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=0;i<n;i++) scanf("%d",&a[i]);
^
0_0_33465449_30370.c:30:6: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_33465449_30370.c:36:17: error: redefinition of 'i'
for(int i=0;i<n;i++) for(int j=i+1;j<n;j++){
^
0_0_33465449_30370.c:30:14: note: previous definition of 'i' was here
for(int i=0;i<n;i++) scanf("%d",&a[i]);
^
0_0_33465449_30370.c:36:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=0;i<n;i++) for(int j=i+1;j<n;j++){
^
0_0_33465449_30370.c:36:30: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=0;i<n;i++) for(int j=i+1;j<n;j++){
^
0_0_33465449_30370.c:42:17: error: redefinition of 'i'
for(int i=tmax;i>=0&&temp>0;i--){
^
0_0_33465449_30370.c:36:17: note: previous definition of 'i' was here
for(int i=0;i<n;i++) for(int j=i+1;j<n;j++){
^
0_0_33465449_30370.c:42:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=tmax;i>=0&&temp>0;i--){
^
0_0_33465449_30370.c:43:10: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int j=0;j<mymin(temp,count[i]);j++) ans[ansnum++]=i;
^
0_0_33465449_30370.c:46:17: error: redefinition of 'i'
for(int i=0;i<m-1;i++) printf("%d ",ans[i]);
^
0_0_33465449_30370.c:42:17: note: previous definition of 'i' was here
for(int i=tmax;i>=0&&temp>0;i--){
^
0_0_33465449_30370.c:46:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=0;i<m-1;i++) printf("%d ",ans[i]);
^
|