| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1366962 | kawhiet | Lottery (CEOI18_lot) | C++20 | 3095 ms | 512 KiB |
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 47
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, l;
cin >> n >> l;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int q;
cin >> q;
while (q--) {
int k;
cin >> k;
for (int i = 0; i <= n - l; i++) {
int res = 0;
for (int j = 0; j <= n - l; j++) {
if (i == j) {
continue;
}
int c = 0;
for (int d = 0; d < l; d++) {
if (a[i + d] != a[j + d]) {
c++;
}
}
if (c <= k) {
res++;
}
}
cout << res << " \n"[i == n - l];
}
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
