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_18310453_15706.c:6:1: error: unknown type name 'bool'
 bool np[N];
 ^
0_0_18310453_15706.c:6:6: error: variably modified 'np' at file scope
 bool np[N];
      ^
0_0_18310453_15706.c:7:5: error: variably modified 'prime' at file scope
 int prime[N];
     ^
0_0_18310453_15706.c:8:5: error: variably modified 'pi' at file scope
 int pi[N];
     ^
0_0_18310453_15706.c: In function 'getprime':
0_0_18310453_15706.c:13:18: error: 'true' undeclared (first use in this function)
  np[0] = np[1] = true;
                  ^
0_0_18310453_15706.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
0_0_18310453_15706.c:15:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 2; i < N; ++i)
  ^
0_0_18310453_15706.c:15:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_18310453_15706.c:20:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = 1; j <= cnt && i * prime[j] < N; ++j)
   ^
0_0_18310453_15706.c: At top level:
0_0_18310453_15706.c:32:5: error: variably modified 'phi' at file scope
 int phi[PM + 1][M + 1];
     ^
0_0_18310453_15706.c:32:5: error: variably modified 'phi' at file scope
0_0_18310453_15706.c:33:5: error: variably modified 'sz' at file scope
 int sz[M + 1];
     ^
0_0_18310453_15706.c: In function 'init':
0_0_18310453_15706.c:39:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i <= PM; ++i)
  ^
0_0_18310453_15706.c:41:11: error: redefinition of 'i'
  for (int i = 1; i <= M; ++i)
           ^
0_0_18310453_15706.c:39:11: note: previous definition of 'i' was here
  for (int i = 0; i <= PM; ++i)
           ^
0_0_18310453_15706.c:41:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 1; i <= M; ++i)
  ^
0_0_18310453_15706.c:44:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = 1; j <= PM; ++j)
   ^
0_0_18310453_15706.c: In function 'sqrt2':
0_0_18310453_15706.c:54:9: error: expected expression before 'int'
  return int(r - 1);
         ^
0_0_18310453_15706.c: In function 'sqrt3':
0_0_18310453_15706.c:62:9: error: expected expression before 'int'
  return int(r - 1);
         ^
0_0_18310453_15706.c: In function 'getphi':
0_0_18310453_15706.c:77:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int i = s + 1; i <= s2x; ++i)
   ^
0_0_18310453_15706.c: In function 'getpi':
0_0_18310453_15706.c:89:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = pi[sqrt3(x)] + 1, ed = pi[sqrt2(x)]; i <= ed; ++i)
  ^
0_0_18310453_15706.c: In function 'lehmer_pi':
0_0_18310453_15706.c:102:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = a + 1; i <= b; i++)
  ^
0_0_18310453_15706.c:109:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int j = i; j <= lim; j++)
   ^


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 02:14:19, Gzip enabled