# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1059896 | 2024-08-15T08:56:56 Z | kachim2 | Lottery (CEOI18_lot) | C++17 | 0 ms | 0 KB |
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; }