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_35912271_18149.c:4:5: error: variably modified 'p' at file scope
 int p[N],phi[M],cnt;
     ^
0_0_35912271_18149.c:4:10: error: variably modified 'phi' at file scope
 int p[N],phi[M],cnt;
          ^
0_0_35912271_18149.c:5:11: error: variably modified 'ans' at file scope
 long long ans[N];
           ^
0_0_35912271_18149.c:6:1: error: unknown type name 'bool'
 bool vis[M];
 ^
0_0_35912271_18149.c:6:6: error: variably modified 'vis' at file scope
 bool vis[M];
      ^
0_0_35912271_18149.c: In function 'getprime':
0_0_35912271_18149.c:34:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i=2;i<=n;++i){
     ^
0_0_35912271_18149.c:34:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_35912271_18149.c:39:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
         for(int j=1;p[j]<=n/i;++j){
         ^
0_0_35912271_18149.c:40:25: error: 'true' undeclared (first use in this function)
             vis[p[j]*i]=true;
                         ^
0_0_35912271_18149.c:40:25: note: each undeclared identifier is reported only once for each function it appears in
0_0_35912271_18149.c: In function 'main':
0_0_35912271_18149.c:52:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i=1;i<=20000000;++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 03:22:35, Gzip enabled