/ Vijos /

记录详情

Runtime Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:17:30: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
  if(x==0) while(scanf("%d",&n)!=EOF) printf("%lld\n",a[n]);
                            ~~^
/in/foo.cc:18:30: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
  if(x==1) while(scanf("%d",&n)!=EOF) printf("%lld\n",b[n]); 
                            ~~^
/in/foo.cc:14:43: warning: iteration 500000 invokes undefined behavior [-Waggressive-loop-optimizations]
  for(int i=5;i<=1000005;i+=2,temp+=4) a[i]=a[i-1]+temp,a[i+1]=a[i]+temp;
                                       ~~~~^~~~~~~~~~~~
/in/foo.cc:14:15: note: within this loop
  for(int i=5;i<=1000005;i+=2,temp+=4) a[i]=a[i-1]+temp,a[i+1]=a[i]+temp;
              ~^~~~~~~~~
/in/foo.cc:16:62: warning: iteration 499998 invokes undefined behavior [-Waggressive-loop-optimizations]
  for(int i=8;i<=1000005;i+=2,temp+=4) b[i]=b[i-1]+temp,b[i+1]=b[i]+temp;
                                                        ~~~~~~^~~~~~~~~~
/in/foo.cc:16:15: note: within this loop
  for(int i=8;i<=1000005;i+=2,temp+=4) b[i]=b[i-1]+temp,b[i+1]=b[i]+temp;
              ~^~~~~~~~~
# 状态 耗时 内存占用
#1 Runtime Error 17ms 15.598 MiB
#2 Runtime Error 13ms 15.625 MiB

信息

递交者
类型
递交
题目
P1542 zgx的跳棋游戏
语言
C++
递交时间
2017-10-17 15:09:44
评测时间
2017-10-17 15:09:44
评测机
分数
0
总耗时
31ms
峰值内存
15.625 MiB