/ Vijos /

记录详情

Compile Error

foo.cc:3:68: warning: overflow in conversion from 'long int' to 'int' changes value from '-1145141919810' to '1614348222' [-Woverflow]
    3 | int n,a[100000000],opt,que = -1145141919,add = -1145141919,cover = -1145141919810;
      |                                                                    ^~~~~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:14:20: error: expected primary-expression before '%' token
   14 |         scanf("%d",%n);
      |                    ^
foo.cc:15:21: error: 'q' was not declared in this scope
   15 |         scanf("%d",&q);
      |                     ^
foo.cc:18:24: error: expected '(' before 'opt'
   18 |                 switch opt:
      |                        ^~~
      |                        (
foo.cc:20:17: error: case label '2' not within a switch statement
   20 |                 case 2:scanf("%d",&v),add = v;break;
      |                 ^~~~
foo.cc:20:36: error: 'v' was not declared in this scope
   20 |                 case 2:scanf("%d",&v),add = v;break;
      |                                    ^
foo.cc:21:17: error: case label '3' not within a switch statement
   21 |                 case 3:scanf("%d",&v),que = v;break;
      |                 ^~~~
foo.cc:22:17: error: case label '4' not within a switch statement
   22 |                 case 4:scanf("%d",&v),cover = v;break;
      |                 ^~~~
foo.cc:23:17: error: case label '5' not within a switch statement
   23 |                 case 5:scanf("%d",&v),printf("%d",ask(v));break;
      |                 ^~~~
foo.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
foo.cc:13:11: note: to match this '{'
   13 | int main(){
      |           ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P2051 快速查询
语言
C++
递交时间
2023-06-24 17:32:26
评测时间
2023-06-24 17:32:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes