记录详情

Compile Error

foo.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
foo.c: In function 'main':
foo.c:6:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    6 | scanf("%d%d",&n,&Q);
      | ^~~~~~~~~~~~~~~~~~~
foo.c:7:23: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    7 | for(int i=1;i<=n;i++){scanf("%d",&a[i]);s[i]=s[i-1]+a[i];}
      |                       ^~~~~~~~~~~~~~~~~
foo.c:9:1: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
    9 | scanf("%d%d",&l,&r);
      | ^~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
【模板】序列前缀和
语言
C
递交时间
2022-07-16 18:15:12
评测时间
2022-07-16 18:15:12
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes