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_26857184_3061.c:4:5: error: variably modified 'cost' at file scope
 int cost[maxN + 1];
     ^
0_0_26857184_3061.c:5:5: error: variably modified 'dp' at file scope
 int dp[1<<maxN];
     ^
0_0_26857184_3061.c:6:5: error: variably modified 'tspDp' at file scope
 int tspDp[1 << maxN][maxN];
     ^
0_0_26857184_3061.c:6:5: error: variably modified 'tspDp' at file scope
0_0_26857184_3061.c:7:5: error: variably modified 'best' at file scope
 int best[1 << maxN];
     ^
0_0_26857184_3061.c:8:5: error: variably modified 'pos' at file scope
 int pos[maxN+1][2];
     ^
0_0_26857184_3061.c:10:5: error: variably modified 'S' at file scope
 int S[1 << maxN];
     ^
0_0_26857184_3061.c:11:5: error: variably modified 'dist' at file scope
 int dist[maxN][maxN];
     ^
0_0_26857184_3061.c:11:5: error: variably modified 'dist' at file scope
0_0_26857184_3061.c: In function 'InitDist':
0_0_26857184_3061.c:22:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 1; i <= n; i++)
  ^
0_0_26857184_3061.c:22:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_26857184_3061.c:24:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = 1 ; j <= n ; j ++ )
   ^
0_0_26857184_3061.c: At top level:
0_0_26857184_3061.c:31:1: error: unknown type name 'bool'
 bool check(int state , int n , int maxCost )
 ^
0_0_26857184_3061.c: In function 'check':
0_0_26857184_3061.c:34:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0 ; i < n ; i ++  )
  ^
0_0_26857184_3061.c: In function 'dpFunc':
0_0_26857184_3061.c:46:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i < (1 << n); i++)dp[i] = INF;
  ^
0_0_26857184_3061.c:48:11: error: redefinition of 'i'
  for (int i = 1 ; i <= total ; i ++ )
           ^
0_0_26857184_3061.c:46:11: note: previous definition of 'i' was here
  for (int i = 0; i < (1 << n); i++)dp[i] = INF;
           ^
0_0_26857184_3061.c:48:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 1 ; i <= total ; i ++ )
  ^
0_0_26857184_3061.c:50:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = ( (1 << n)  - 1 ) ; j >= 0 ; j -- )
   ^
0_0_26857184_3061.c: In function 'mtsp':
0_0_26857184_3061.c:63:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i < (1 << n); i++)  best[i] = INF;
  ^
0_0_26857184_3061.c:64:11: error: redefinition of 'i'
  for (int i = 1 ; i <= total ; i ++ )
           ^
0_0_26857184_3061.c:63:11: note: previous definition of 'i' was here
  for (int i = 0; i < (1 << n); i++)  best[i] = INF;
           ^
0_0_26857184_3061.c:64:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 1 ; i <= total ; i ++ )
  ^
0_0_26857184_3061.c:66:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = 0 ; j < n ; j ++ )
   ^
0_0_26857184_3061.c:76:6: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
      for (int k = 0 ; k < n ; k ++ )
      ^
0_0_26857184_3061.c:88:10: error: redefinition of 'i'
  for(int i = 0 ; i < ( 1 << n) ; i ++ )
          ^
0_0_26857184_3061.c:64:11: note: previous definition of 'i' was here
  for (int i = 1 ; i <= total ; i ++ )
           ^
0_0_26857184_3061.c:88:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for(int i = 0 ; i < ( 1 << n) ; i ++ )
  ^
0_0_26857184_3061.c:92:4: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
    for (int j = i & ( i - 1 ) ; j ; j = i & ( j - 1 ) )
    ^
0_0_26857184_3061.c: In function 'main':
0_0_26857184_3061.c:109:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 1 ; i <= n ; i ++ )
   ^
0_0_26857184_3061.c:115:12: error: redefinition of 'i'
   for (int i = 1 ; i <= n ; i ++ )
            ^
0_0_26857184_3061.c:109:12: note: previous definition of 'i' was here
   for (int i = 1 ; i <= n ; i ++ )
            ^
0_0_26857184_3061.c:115:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 1 ; i <= n ; i ++ )
   ^
0_0_26857184_3061.c:121:12: error: redefinition of 'i'
   for (int i = 0 ; i <  (1 << n)  ; i ++ )
            ^
0_0_26857184_3061.c:115:12: note: previous definition of 'i' was here
   for (int i = 1 ; i <= n ; i ++ )
            ^
0_0_26857184_3061.c:121:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = 0 ; i <  (1 << n)  ; i ++ )
   ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 01:02:46, Gzip enabled