That's a lot of monkeys code-golf string random
The infinite monkey theorem states that given infinite time a machine sending an endless stream of random characters will always type any given text.
That sounds to me like a great idea for a challenge.
Process
In order to monkey-ize a string,...
This is a pretty simple one. if the user enters "Hello World" your code should output "dlroW olleH"
I was inspired by the multiplication question recently posted. I know this is probably easy in bash.
As this is code-golf, least bytes wins.
@Mego Does anyone outside of the US even play baseball and participate in this World Series?
Anonymous
@Pavel Canada has a team. The MLB is the most competitive professional baseball league in the world, so it's a pretty good bet that whoever wins the championship is the best team in the world.
Introduction:
When we think about Ladybugs, we usually think of a red or dark orange bug with black spots. Although this isn't necessary true, since there are also black with red/orange spotted ladybugs, or ladybugs without spots at all, we mainly picture ladybugs something like this Asian Ladyb...
Write a program or a function that accepts the list of outputs from a logic function and outputs the LaTeX code for its truth table.
The inputs should be labeled as lowercase letters a-z, and the output should be labelled as F. The length of list of inputs will always be shorter than 2^25, which...
RLE Brainfuck
(related to BF-RLE)
The hypothetical RLE dialect of Brainfuck except the symbols for the 8 commands, also accepts digits. The digits are used to represent the number of succesive repetitions of a command, thus allowing run-length encoding of the source code.
8> is equal to >>>>>>...
@Pavel Similar to American Football (the NFL), or American Hockey (the NHL), or American Basketball (the NBA), the teams already recruit top talent from around the world, so those sports aren't as "big" in other countries
@Mr.Xcoder There's one thing I'm, a bit unsure of though.. Say my original code is: f(a)builtin_1(a), and it's a LD of 2. Then f(b)builtin_1(b) would be a valid robber post, and that's too simple..
I'm wondering if I should attempt to write a rule that prevents such solutions, or if I should just let the cop figure out a way to avoid it...
I would just let the cops figure it out. I mean, how many Foo polyglot answers were there on that other CnR before cops wised up to the fact that Foo was a valid Robber crack?
This is the Cop post. The Robber post is here.
Your task is to take an integer input N and output the Nth digit in the sequence OEIS A002942.
The sequence consists of the square numbers written backwards:
1, 4, 9, 61, 52, 63, 94, 46, 18, 1, 121, 441, ...
Note that leading zeros are trimmed...
This is the Robber post. The Cop post is here.
Your task is to take an integer input N and output the Nth digit in the sequence OEIS A002942.
The sequence consists of the square numbers written backwards:
1, 4, 9, 61, 52, 63, 94, 46, 18, 1, 121, 441, ...
Note that leading zeros are trimmed...
I am new to competitive programming and recently I came across a coding problem on Hackerrank which uses the concept of longest common subsequence problem.Problem link It simply says to find the longest common subsequence of the two given string. I am willing to make a solution using two hashtabl...
@user202729 Yes. I sometimes star messages that have already been starred even if they're slightly less interesting than other messages that I otherwise wouldn't star.
Essentially, checking for two users that seem to have an odd correlation of activities. This includes the two users knowing each others' intents extremely well (because they are the same person), though that's hard to check because you can't really tell that over the internet (or IRL either) and some people just think similarly anyway :P
@StewieGriffin Essentially same thing as for characters but with bytes. So example would be, let's say we have two two-byte characters. For LD with chars, that would be 1. For LD with bytes, that's either 1 or 2, depending on whether or not the bytes are both different
@AdmBorkBork sorry your profile pics look too similar xD
A Latin Square is a square of size n × n containing numbers 1 to n inclusive. Each number occurs once in each row and column
An example of a 3 × 3 Latin Square is:
[[1, 2, 3],
[3, 1, 2],
[2, 3, 1]]
Another is:
[[3, 1, 2],
[2, 3, 1],
[1, 2, 3]]
Given an integer input n where n > 0, dete...
@StewieGriffin what HyperNeutrino said. the LD is basically just defined on lists of "values" that can be compared for equality. and the program can be thought of as either a list of bytes or a list of characters.
Tetris battle
tetris king-of-the-hill javascript
I'm surprised there is no Tetris KOTH challenge on this site yet. So, here's one.
I guess you know what Tetris is, but if you don't, I'll try to explain:
So there is a 2 dimensional board, often with size 10x20. On the top of the board, in ...
Given pixel locations (x1,y1) and (x2,y2), how might you find the set of pixels the line segment from the center of (x1,y1) to the center of (x2,y2) touches?
(Bresenham's algorithm doesn't work since it would miss some pixels.)
You will be given two Arrays / Lists / Vectors of non-negative integers A and B. Your task is to output the highest integer N that appears in both A and B, and is also unique in both A and B.
You may assume that there is at least one such number.
Any reasonable Input and Output method / format...
Cops and Robbers Uniqueness
Given the output of the cop's program (o), the byte-count (n) and the number of unique characters (c) used, come up with a corresponding piece of code that is n bytes long with c unique characters which matches the cop's output o.
Cops should post solutions like th...
For example, it generates UTF-8 surrogate pairs rather than 4-byte sequences like the standard mandates
Also, how should I do bonuses? For example, my challenge says that upon encountering an initial "inverted byte order mark", the submission can either fail immediately or try to parse the remainder, knowing that it was translated to UTF-8 without flipping endianness around.
Vim doesn't know what a BOM is and it bothers me so much when I open a file saved by another application with a BOM and there is that small bit of garbage at the start.
@AdmBorkBork the reason is that in both lists 18 appears twice (i.e. same amount of times), so multiset difference doesn't contain any 18s, causing them not to get filtered out and counted as the final max
That is in VBA, when you right Function F(x):(some code) and then hit enter, VBA autocompletes out a needed terminal End Function
as far as y'all know and are concerned would Function F(X):(some code) with an additional byte added for the terminal return keystroke be valid for code golg?
UTF-8 repair
code-golf unicode string
UTF-8 is the standard by which most of the world operates. Software that was intended to take in other encodings have been modified or wrapped to use UTF-8 as input and output, some with bugs and/or sloppy adherence to the standard.
The challenge
Given a...
When a user requests access to a private chat room, they must wait until a room owner checks the "access" tab on the "info" section of a chat room and grants them write privileges. I think that the owners of the room should be notified when a user requests access to the chat room, in order to ma...
I'm trying to help a small medical practice properly schedule patients. I want to build an app that suggests to the user the recommended date and time to schedule a patient based on the following criteria:
This practice has more than 1 provider and each can see any patient.
Most seen patients w...
Well that's a shame @EriktheOutgolfer, what shall i do with all this butter
and @AdmBorkBork, that seems reasonable and what I'll go with for the moment, but I think that I'll write up a meta post on the matter so I can reference it on the Tips for Golfing in VBA page