/ Vijos /

记录详情

Accepted

/in/foo.cc: In function 'int main()':
/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 Accepted 10ms 15.598 MiB
#2 Accepted 11ms 15.625 MiB

信息

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