记录详情

Compile Error

foo.c:1:20: warning: extra tokens at end of #include directive
 #include <stdio.h> int main() { int n, m; int num[110]; int opt, l, r, v; scanf("%d%d", &n, &m); for (int i = 1; i <= n; i ++ ) { scanf("%d", &num[i]); }for (int i = 1; i <= m; i ++ ) { scanf("%d", &opt); if (opt == 1) { scanf("%d%d%d", &l, &r, &v); for (int j = l; j <= r; j ++ ) { num[j] += v; } }if (opt == 2) { int ans = 0; scanf("%d%d", &l, &r); for (int j = l; j <= r; j ++ ) { ans += num[j]; }printf("%d\n", ans); } }return 0; }
                    ^~~
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1003 假的线段树
语言
C
递交时间
2021-10-06 19:23:19
评测时间
2021-10-06 19:23:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes