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_21226600_9912.c:5:1: error: unknown type name 'bool'
 bool check[N];
 ^
0_0_21226600_9912.c:5:6: error: variably modified 'check' at file scope
 bool check[N];
      ^
0_0_21226600_9912.c:6:4: error: variably modified 'phi' at file scope
 LL phi[N],prime[N>>1],tot;
    ^
0_0_21226600_9912.c:6:11: error: variably modified 'prime' at file scope
 LL phi[N],prime[N>>1],tot;
           ^
0_0_21226600_9912.c:7:4: error: variably modified 'sum' at file scope
 LL sum[N],k,n,m,p;
    ^
0_0_21226600_9912.c: In function 'getphi':
0_0_21226600_9912.c:19:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for(int i=2;i<=N-5;++i){
   ^
0_0_21226600_9912.c:19:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_21226600_9912.c:24:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int j=1;j<=tot;++j){
     ^
0_0_21226600_9912.c:26:25: error: 'true' undeclared (first use in this function)
       check[i*prime[j]]=true;
                         ^
0_0_21226600_9912.c:26:25: note: each undeclared identifier is reported only once for each function it appears in
0_0_21226600_9912.c:34:11: error: redefinition of 'i'
   for(int i=1;i<=N-5;++i){
           ^
0_0_21226600_9912.c:19:11: note: previous definition of 'i' was here
   for(int i=2;i<=N-5;++i){
           ^
0_0_21226600_9912.c:34:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for(int i=1;i<=N-5;++i){
   ^
0_0_21226600_9912.c: In function 'solve':
0_0_21226600_9912.c:45:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for(int i=1;i<=tot&&prime[i]*prime[i]<=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-06-22 04:23:15, Gzip enabled