Can You Catch the Robber?
This is not a cops and robbers type challenge, but a code-golf challenge based on the PBS Infinite Series video Cops and Robbers Theorem.
Challenge
Given an undirected and connected graph, you must determine if the graph is cop-win. That means that if a cop and robbe...
CMC: Given two lists of equal length [a,b,c,..] and [A,B,C,..], and an n as a limit, find all numbers from 1 to n where i mod a == A, i mod b == B, etc.
I have to say, I have no idea how @dzaima can answer CMC's so fast, which non-ASCII solutons in SOGL. It seems as though he doesn't have to copy paste :P
@cairdcoinheringaahing I really disagree this time. 1. Mine allows empty fields 2. Mine has flexible I/O rules, whilst the other has tiranic rules 3. In mine, you can assume the board is valid, and that does not happen in the other challenge
Checking if the board is valid would add about 20 bytes to the Jelly answer, and handling all formats of input would be close to impossible
@Mr.Xcoder Well, I guess we'll have to agree to disagree :( Although, I rank this as a "low-level" close vote (I VTC, if it doesn't get closed, so be it), as compared to "high level" (where I will actively try to get others to VTC)
I have almost certainly screwed this up but: Haskell, 119 bytes: f a b n = [x | x <- [1..n], [foldl (&&) True g | g <- [[mod x (a!!i) == (b!!i) | i <- [0..((length a)-1)]]]] == [True]]
Ready for a challenge?
I have a puzzle that I'm trying to code a solution for in Lua (though any language would be appreciated). It involves moving blocks of "crates" onto a "deck" to fill in the positions so no blank spaces are remaining.
The puzzle looks like so:
A B C D E F
...
@Neil This was presented as a proof golf, so you would start with a+b and apply axioms until you get b+a. The goal is not just to prove it but to do so in as few steps as possible.
Does anyone know the name of the language that had like 10-byte long but single character commands? It was the one that caused us to switch to bytes from characters
Programming is very rigid. You can't tell a program to "output the banana count", you have to tell it to print(bananas).
But when you do that, you end up with a problem: you don't know how many bananas you have beforehand, so you don't know whether to use a plural.
Sometimes, programmers go the...