#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,l;
cin >> n >> l;
int tab[n];
int odp[n];
for (int i=0; i<n; i++){
cin >> tab[i];
}
map<pair<int,int>,vector<int>> mapa;
for (int i=0; i<(n-l+1); i++){
for (int j=0; j<l; j++){
if (mapa.find({j,tab[i+j]}) != mapa.end()){
mapa[{j,tab[i+j]}].push_back(i);
}
else{
mapa[{j,tab[i+j]}] = {j};
}
}
}
int q,k;
cin >> q;
for (int i=0; i<q; i++){
cin >> k;
for (int j=0; j<n; j++){
cout << odp[j]<< " ";
}
cout << endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |