/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:7:20: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
    7 |         while(2^i-1<N) {a[i]=2^i-1;i++;}
      |                 ~~~^~
foo.cc:7:33: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
    7 |         while(2^i-1<N) {a[i]=2^i-1;i++;}
      |                                ~^~
foo.cc:9:17: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
    9 |         p=N-(2^i-1)
      |                ~^~
foo.cc:9:20: error: expected ';' before 'i'
    9 |         p=N-(2^i-1)
      |                    ^
      |                    ;
   10 |         i=1;
      |         ~           
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1319 数列
语言
C++
递交时间
2022-08-16 13:35:36
评测时间
2022-08-16 13:35:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes