编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#4981 | #1031. 统计 | Compile Error | 0 | 0 ms | 0 K | C++ 17 / 1.4 K | Raines | 2024-02-25 14:31:54 |
using namespace std;
const int maxn = 500000 + 5;
const int maxm = maxn * 40;
int n, T, a, rt;
int L, R, sum, tot = 0;
int la;
int
int
int
int
编译信息
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:37:2: error: 'memset' was not declared in this scope
37 | memset(la, -1, sizeof(la));
| ^~~~~~
/sandbox/1/a.cpp:3:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
2 | #include<iostream>
+++ |+#include <cstring>
3 | using namespace std;
/sandbox/1/a.cpp:35:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
35 | scanf("%d%d", &n, &T);
| ~~~~~^~~~~~~~~~~~~~~~
/sandbox/1/a.cpp:36:36: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
36 | for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
| ~~~~~^~~~~~~~~~~~~
/sandbox/1/a.cpp:51:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
51 | int x, y; scanf("%d%d", &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~