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_38630707_6097.cpp:6:15: error: 'MAXN' was not declared in this scope
 int cnt,prime[MAXN],T,g,l,val;
               ^~~~
0_0_38630707_6097.cpp:6:15: note: suggested alternative: 'NAN'
 int cnt,prime[MAXN],T,g,l,val;
               ^~~~
               NAN
0_0_38630707_6097.cpp: In function 'void get_prime(long long int)':
0_0_38630707_6097.cpp:10:5: error: 'memset' was not declared in this scope
     memset(is_prime,1,sizeof(is_prime));
     ^~~~~~
0_0_38630707_6097.cpp:10:5: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
0_0_38630707_6097.cpp:4:1:
+#include <cstring>
 using namespace std;
0_0_38630707_6097.cpp:10:5:
     memset(is_prime,1,sizeof(is_prime));
     ^~~~~~
0_0_38630707_6097.cpp:14:30: error: 'prime' was not declared in this scope
         if(is_prime[i] == 1) prime[++cnt] = i;
                              ^~~~~
0_0_38630707_6097.cpp:14:30: note: suggested alternative: 'is_prime'
         if(is_prime[i] == 1) prime[++cnt] = i;
                              ^~~~~
                              is_prime
0_0_38630707_6097.cpp:15:39: error: 'prime' was not declared in this scope
         for(int j = 1;j <= cnt && i * prime[j] <= n;j++)
                                       ^~~~~
0_0_38630707_6097.cpp:15:39: note: suggested alternative: 'is_prime'
         for(int j = 1;j <= cnt && i * prime[j] <= n;j++)
                                       ^~~~~
                                       is_prime


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-10-18 14:17:38, Gzip enabled