/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'void primes(int)':
/in/foo.cc:18:19: warning: left operand of comma operator has no effect [-Wunused-value]
       for(ll j=1;j<=num1,i*prime[j]<=n;++j){
                  ~^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:36:15: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'll* {aka long long int*}' [-Wformat=]
  scanf("%d",&n);primes(maxx);
             ~~^
/in/foo.cc:39:46: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
  for(int i=1;i<=num2;++i)printf("%d\n",ans[i]);
                                        ~~~~~~^
/in/foo.cc:17:16: warning: iteration 100008 invokes undefined behavior [-Waggressive-loop-optimizations]
       if(!vis[i]){prime[++num1]=i;prime1[i]=1;}
           ~~~~~^
/in/foo.cc:16:17: note: within this loop
     for(ll i=2;i<=n;++i){
                ~^~~
# 状态 耗时 内存占用
#1 Runtime Error 3ms 1.809 MiB
#2 Runtime Error 3ms 1.82 MiB
#3 Runtime Error 3ms 1.812 MiB
#4 Runtime Error 4ms 1.805 MiB
#5 Runtime Error 4ms 1.824 MiB

信息

递交者
类型
递交
题目
P1359 Superprime
语言
C++
递交时间
2018-11-03 15:24:59
评测时间
2018-11-03 15:24:59
评测机
分数
0
总耗时
19ms
峰值内存
1.824 MiB