We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def sat(s: List[int]): """ Find a sequence of 0's and 1's so that, after n_steps of swapping each adjacent (0, 1), the target sequence is achieved. Inspired by [Codeforces Problem 266 B](https://codeforces.com/problemset/problem/266/B) """ for step in range(8): for i in range(len(s) - 1): if (s[i], s[i + 1]) == (0, 1): (s[i], s[i + 1]) = (1, 0) return s == [1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Solvers, post your solutions in the comments using the following formatting:
<details><summary>Reveal solution</summary> ```python def sol(): return "world" # replace with your solution ``` </details>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Solvers, post your solutions in the comments using the following formatting:
The text was updated successfully, but these errors were encountered: