ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#211995 | #3816. 元素 | chenchen | Compile Error | / | / | C++ | 356b | 2024-10-13 09:44:42 | 2024-10-13 12:10:37 |
answer
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 2e3 + 10;
int n, q;
int a[N], b[N];
int main()
{
scanf("%d%d", &n ,&q);
for (int i = 1; i <= n; i ++ )
{
scanf("%d", &a[i]);
}
while (q -- )
{
int l, r;
scanf("%d%d", &l, &r);
printf("%d\n", r - l + 1);
}
return 0;
}
详细
answer.code: In function 'int main()': answer.code:14:22: error: 'scanf' was not declared in this scope scanf("%d%d", &n ,&q);\x0d ^ answer.code:23:27: error: 'printf' was not declared in this scope printf("%d\n", r - l + 1);\x0d ^