Posts by WheatWizard
You are a low-level censor working for the Ministry of Media Accuracy. Part of your job is to make sure that certain words don't appear in publications. Every morning you get a fresh stack of next...
Given a list of non-negative integers the function $f$ replaces every integer with the number of identical integers preceding it (not necessarily contiguously). So f [1,1,2,2,1,3,3] = [1,2,1,2,3,1...
You work at a beach. In the afternoon, the sun gets quite hot and beachgoers want to be shaded. So you put out umbrellas. When you put out umbrellas you want to shade the entire beach, with as few ...
Given two binary strings $A$ and $B$ such that $A$ is an anagram of $B$, output a third binary string $S$ such that both $A$ and $B$ can be created by iterated removals of the substring $10101$ fro...
Task Given a list of numbers $X$ produce a second list of numbers $Y$ such that $Y_i$ is the length of the longest common prefix of $X$ and $X$ with the first $i$ elements removed. For example if...
The Fibonacci sequence starts with [1,1] and then continues to the right with each number being the sum of the previous number. For example the first 10 terms are [1,1,2,3,5,8,13,21,34,55]. We ca...
Haskell + hgl, 9 bytes fe"abipq" Attempt This Online! This is the obvious solution and it's pretty much unbeatable. I also tried this solution avoiding the hardcoded string: 27 bytes ('x'&g...
Let's imagine a point in three dimensional space. We will start it located at $(0,0,0)$. Then we will receive a series of instructions. x, y, and z indicate moving unit distance in the positive $x$...
A Sturmian sequence is an infinite binary sequence satisfying two properties: It is balanced. This can be stated a number of equivalent ways: There is no pair of equal length subwords whose d...
A finite binary string is "Sturmian" if for every two contiguous substrings $x$ and $y$ of the same length, the number of $0$s in $x$ and $y$ differs by at most 1. Your program should take a finit...
In this challenge you will take an Irish word and a personal pronoun and create the possessive pronoun construction combining the two. For example sé, madra becomes a mhadra. Translated to English...
You work in a kitchen which has a peculiar rule. When you mix something into a pot you must always add at least one new ingredient. So you can add pasta, oil, salt then pesto, but not pasta, pesto...
The Universal Crossword has a set of guidelines for crossword puzzle submissions. In this challenge we are going to be concerned with their rules for hidden word themes. A hidden word clue consis...
Recently I asked for tips on improving some code-golf of mine. The code was supposed to output every third value of the Fibonacci sequence starting with 2: 2,8,34,144,610,2584,10946,46368,196418,...
Given a number $n \geq 3$ as input output the smallest number $k$ such that the modular residues of $k$ by the first $n$ primes is exactly $\{-1,0,1\}$. That is there is a prime in the first $n$ p...
Task You are going to take three strings as input $A$, $B$ and $X$. And your goal is to determine if there exists a third string $S$ such that both $A$ and $B$ can be formed by iteratively removin...
In this challenge you will take a number $n$ and a string $X$ of length $\geq n$, and produce a regular expression which matches all strings that are within $n$ character substitutions of $X$. Spe...
Haskell + hgl, 14 bytes xBl<<ss><fn<iw Attempt This Online! Explanation ss gets all substrings of the input fn filters out the substrings that don't ... iw checks if the fo...
I'm going to reiterate and build off ideas I laid out on this post on PPCG. First let's point out that at current the leader board does not support fractional scores. In this answer I am going to ...
Haskell + hgl, 134 bytes k=cy"X.XX" x#1=[4,0,9,9]!x 2#y=8 3#y=[8,9,4,4]!y x#3=[0,3]!x _#_=0 x?y|(n,j)<-fvD 4$x%4#(y%4)=tk y$dr j$tk x<dr n<cy[dr2 k,k,cy".X",k] Attempt This Onlin...
An polyomino is a non-empty connected subset of the square tiling consisting of squares joined along their edges. We will not require that polyominos be simply connected, that is they can have hole...
An $n$-polyomino is a connected subset of the square tiling consisting of $n$ squares. We will not require that polyominos be simply connected, that is they can have holes. We will say a $n$-polyo...
Haskell + hgl, 32 24 bytes tlM$tk6<cy<fiI(rl2~<)eL3 Explanation tlM map a over the tail of the input ... fiI if ... el3 the length is 3 (rl2~<) repeat each letter in place twi...
Your task is to write a program $p$ which outputs a string $s$ with the same length as $p$, where $s \neq p$. If I remove the $n$th byte from your program to get program $q$, then either $q$ outpu...
At my job we have to sometimes lay out materials. Materials come in large long rolls and are cut into smaller pieces when being laid out. When we order the rolls we draw up a layout document which...
