记录详情

Accepted

/in/foo.cc: In function 'void febonacci()':
/in/foo.cc:12:8: warning: iteration 1002 invokes undefined behavior [-Waggressive-loop-optimizations]
   s[i] = s[i-1] + s[i-2];
   ~~~~~^~~~~~~~~~~~~~~~~
/in/foo.cc:11:16: note: within this loop
  for(int i=3; i<=maxn; i++)
               ~^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:20:8: warning: iteration 1003 invokes undefined behavior [-Waggressive-loop-optimizations]
   s[i] += s[i-1];
   ~~~~~^~~~~~~~~
/in/foo.cc:19:16: note: within this loop
  for(int i=2; i<=maxn; i++)
               ~^~~~~~
# 状态 耗时 内存占用
#1 Accepted 1ms 192.0 KiB
#2 Accepted 1ms 200.0 KiB
#3 Accepted 1ms 320.0 KiB
#4 Accepted 1ms 316.0 KiB

信息

递交者
类型
递交
题目
1-2 斐波那契数列的和
语言
C++
递交时间
2018-12-02 11:01:29
评测时间
2018-12-02 11:01:29
评测机
分数
100
总耗时
7ms
峰值内存
320.0 KiB