F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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]);
         ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-02-17 07:35:41, Gzip enabled