# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1059896 | kachim2 | Lottery (CEOI18_lot) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
int q;
cin >> q;
while(q--)
{
int k;
cin >> k;
for(int i = 0; i < n-l+1; i++)
{
int ans = 0;
for(int j = 0; j < n-l+1; j++)
{
if (i==j) continue;
int diff = 0;
for(int llll = 0; llll < l; llll++)
{
diff+=a[i+llll]!=a[j+llll];
}
if(diff<=k) ans++;
}
cout << ans << ' ';
}
cout << '\n';
}
return 0;
}