# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1117956 | 2024-11-24T13:05:21 Z | blackslex | Inspections (NOI23_inspections) | C++17 | 581 ms | 1048576 KB |
#include<bits/stdc++.h> using namespace std; int n, m, q, x; int main() { scanf("%d %d %d", &n, &m, &q); vector<int> a, l(m), r(m), lst(n + 5, -1), cnt(n * m + 5); for (int i = 0; i < m; i++) { scanf("%d %d", &l[i], &r[i]); for (int j = l[i]; j <= r[i]; j++) a.emplace_back(j); } for (int i = 0; i < a.size(); i++) { if (lst[a[i]] != -1) cnt[i - lst[a[i]] - 1]++; lst[a[i]] = i; } for (int i = a.size() - 2; i >= 0; i--) cnt[i] += cnt[i + 1]; while (q--) { scanf("%d", &x); printf("%d ", cnt[x]); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 336 KB | Output is correct |
3 | Correct | 1 ms | 436 KB | Output is correct |
4 | Runtime error | 2 ms | 1104 KB | Execution killed with signal 11 |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 336 KB | Output is correct |
3 | Correct | 1 ms | 436 KB | Output is correct |
4 | Runtime error | 2 ms | 1104 KB | Execution killed with signal 11 |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 592 KB | Output is correct |
3 | Correct | 50 ms | 26728 KB | Output is correct |
4 | Runtime error | 581 ms | 1048576 KB | Execution killed with signal 9 |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 336 KB | Output is correct |
3 | Correct | 1 ms | 436 KB | Output is correct |
4 | Runtime error | 2 ms | 1104 KB | Execution killed with signal 11 |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 336 KB | Output is correct |
3 | Correct | 1 ms | 436 KB | Output is correct |
4 | Runtime error | 2 ms | 1104 KB | Execution killed with signal 11 |
5 | Halted | 0 ms | 0 KB | - |