Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

New puzzle inspired by codeforces 266B #8

Description

defsat(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) """forstepinrange(8):
foriinrange(len(s) -1):
if (s[i], s[i+1]) == (0, 1):
(s[i], s[i+1]) = (1, 0)
returns== [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>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions