# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
259991 | 2020-08-08T21:43:37 Z | ly20 | Lottery (CEOI18_lot) | C++17 | 240 ms | 65540 KB |
#include <bits/stdc++.h> using namespace std; const int MAXN = 11234; int v[MAXN]; vector <int> in; //int dif[MAXN][MAXN]; map <vector <int>, int> mp; int main() { int id = 0; int n, l; scanf("%d %d", &n, &l); for(int i = 0; i < n; i++) { scanf("%d", &v[i]); } for(int i = 0; i + l - 1 < n; i++) { id++; for(int j = 0; j < l; j++) { in.push_back(v[i + j]); } mp[in]++; in.clear(); } int q; scanf("%d", &q); for(int i = 0; i < q; i++) { int r; scanf("%d", &r); for(int j = 0; j < id; j++) { for(int o = 0; o < l; o++) { in.push_back(v[j + o]); } printf("%d ", mp[in] - 1); in.clear(); } printf("\n"); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Incorrect | 1 ms | 384 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Incorrect | 1 ms | 384 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 512 KB | Output is correct |
4 | Correct | 36 ms | 2432 KB | Output is correct |
5 | Runtime error | 240 ms | 65540 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 384 KB | Output is correct |
2 | Correct | 5 ms | 384 KB | Output is correct |
3 | Correct | 5 ms | 512 KB | Output is correct |
4 | Correct | 36 ms | 2432 KB | Output is correct |
5 | Runtime error | 240 ms | 65540 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Incorrect | 1 ms | 384 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |