Title: New puzzle inspired by codeforces 266B · Issue #8 · microsoft/PythonProgrammingPuzzles · GitHub
Open Graph Title: New puzzle inspired by codeforces 266B · Issue #8 · microsoft/PythonProgrammingPuzzles
X Title: New puzzle inspired by codeforces 266B · Issue #8 · microsoft/PythonProgrammingPuzzles
Description: 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) "...
Open Graph Description: 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://co...
X Description: 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 Pr...
Opengraph URL: https://github.com/microsoft/PythonProgrammingPuzzles/issues/8
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New puzzle inspired by codeforces 266B","articleBody":"```python\r\ndef sat(s: List[int]):\r\n \"\"\"\r\n Find a sequence of 0's and 1's so that, after n_steps of swapping each adjacent (0, 1), the target sequence\r\n is achieved.\r\n\r\n Inspired by [Codeforces Problem 266 B](https://codeforces.com/problemset/problem/266/B)\r\n \"\"\"\r\n for step in range(8):\r\n for i in range(len(s) - 1):\r\n if (s[i], s[i + 1]) == (0, 1):\r\n (s[i], s[i + 1]) = (1, 0)\r\n return s == [1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\r\n```\r\n\r\nSolvers, post your solutions in the comments using the following formatting:\r\n````\r\n\u003cdetails\u003e\u003csummary\u003eReveal solution\u003c/summary\u003e\r\n\r\n```python\r\ndef sol():\r\n return \"world\" # replace with your solution\r\n```\r\n\u003c/details\u003e\r\n````\r\n","author":{"url":"https://github.com/akalai","@type":"Person","name":"akalai"},"datePublished":"2021-06-20T15:03:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/8/PythonProgrammingPuzzles/issues/8"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d20af3fe-2f4d-6c7b-9017-264151728c8b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5DC:73878:1FAD740:29FF78E:696EEE4D |
| html-safe-nonce | e1bbb245b08ada9c6c94e7f6e24a4b3ca6f12157db43250f6185774cd2a90585 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNURDOjczODc4OjFGQUQ3NDA6MjlGRjc4RTo2OTZFRUU0RCIsInZpc2l0b3JfaWQiOiIyOTAxMTg1Njg5MzU0Njk0MjIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bd198ab9585aefd260e2a04708cde87d29b939419ddb23c5082259a535b2dc80 |
| hovercard-subject-tag | issue:925618342 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/PythonProgrammingPuzzles/8/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0dff1b5115520f9e5a25e6e87c322b21c24aa1232960565fb04b8860f2c06572/microsoft/PythonProgrammingPuzzles/issues/8 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0dff1b5115520f9e5a25e6e87c322b21c24aa1232960565fb04b8860f2c06572/microsoft/PythonProgrammingPuzzles/issues/8 |
| og:image:alt | 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://co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akalai |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/PythonProgrammingPuzzles git https://github.com/microsoft/PythonProgrammingPuzzles.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 361538358 |
| octolytics-dimension-repository_nwo | microsoft/PythonProgrammingPuzzles |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 361538358 |
| octolytics-dimension-repository_network_root_nwo | microsoft/PythonProgrammingPuzzles |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width