- What types of gear/supplies are “must-haves” for private pilots?
- Where can I find out the real reason for a cancelled flight?
- What does OO mean on sectional?
- Do I need a separate SWR meter if the transceiver has has a build-in one?
- Impulsive and habitual hump in a GSD bitch, what could it be?
- How to get the solar zenith from the longitude and latitude?
- Are Trans-Neptunian Objects (TNOs) asteroids?
- Would pole dancing cure microgravity health issues?
- Could a bottle rocket be up scaled to achieve orbit?
- Water Powered Rocket to Orbit?
- How much thrust can plasma water have?
- Radioisotope thermoelectric generator
- Glass looking wierd in rendered result
- OBJ Sequence Texture Mapping Problem
- How cam I make a building's walls grow as if its being constructed?
- Baking particles and hair to texture
- Non-Humanoid Armature Issue
- Creating a delayed blur effect?
- Texturing Not Displaying Fully On Face
- Why do I capture all DNS queries from everyone in the network when I port forward port 53 to my computer?
The Binary Fences
An integer n in the range 2 <= n <= 10
A list of positive integers
Convert the integers to their binary representation (without any leading zeroes), and join them all together.
Then determine all binary substrings that form a 'binary fence' using n amount of fence posts. The spaces (zeros) between each fence post are irrelevant (at least 1), but the fence posts themselves should all be of equal width.
Here the regexes the binary substrings should match for each n:
n Regex to match to be a 'binary fence' Some examples
2 ^(1+)0+\1$ 101; 1100011; 1110111;
3 ^(1+)0+\10+\1$ 10101; 100010101; 110011011001;
4 ^(1+)0+\10+\10+\1$ 1010101; 110110011011; 11110111100001111001111;
etc. etc. You get the point
Looking at the n=4 examples:
^ ^ ^ ^ All fence posts have a width of one 1
^ ^ ^ with one or more 0s in between them
^^ ^^ ^^ ^^ All fenc
Python 2, 271 246 223 bytes
def f(n,l):S=[bin(x)[2:]for x in l];print[[l[j]for j in range(len(l))if i-len(S[j])
Try it online!
-1 byte, thanks to Kevin Cruijssen2018-10-08 13:36:14