/ 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 10000008 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 401ms 157.934 MiB
#2 Runtime Error 355ms 157.93 MiB
#3 Runtime Error 355ms 157.949 MiB
#4 Runtime Error 347ms 157.941 MiB
#5 Runtime Error 358ms 157.934 MiB

信息

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