ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
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 ^