See, I kinda want to nominate the blog for Best Of, but I don't think it really qualifies for "most significant meta impact", and it definitely doesn't qualify for any others :/
CMC: Given a 5-element list L and a number N, replicate the middle element of L so there are N copies of it. E.g.: L=[3,1,4,1,5];N=3 → [3,1,4,4,4,1,5] and L=[2,7,1,8,1];N=0 → [2,7,8,1]
CMC: Given a multi-dimensional non-ragged array and a number, replace each element by a list consisting the given number copies of that element. E.g. 3 and
Although, Jelly's reduce/scan only scans by columns "on accident": reduce [a, b, c, d] by f technically just does ((a f b) f c) f d, so non-vectorising commands have different behaviour. ,Ṁ¥/ means "reduce by: pair arguments, take max" and »/ means "reduce by maximum", but for multidimensional arrays, they are different: Try it online!
@Adám Oof. Pip doesn't have a good way of mapping arbitrary operations at arbitrary depth. It would be super easy if it were string repetition instead of array, though...
In Haskell the obstacle to a lot of these questions is typing. And you often have to get into the weeds of lightly dependently typed stuff in order to get some of these types. But in this one we don't actually care about the shape of the container at all so we abstract all that difficulty out.
Related CMC: Given two identically structured non-ragged arrays, return an array identical to one of them, except each element is copied to N copies, with N being the corresponding number from the other array. E.g.
@DLosc Basically, if you have a dyadic link f(x, y), and in that dyadic link, you have a monadic chain g(k) that calls e.g. f(k, k²), then ß (the recursion operator) is forced to be a monad, which changes the parsing. So, you'd expect ß² to call f(k, k²), but it actually tries to do f(k)² :/
@DLosc Though, parsing issues are why RE is only unary at the moment. Operators in Pip can have multiple arities, but I'm finding that keeping some of them unary-only can help with parsing sometimes.
@DLosc So if you have the Jelly version of f(x, y) { if(x > 0) then g(x) else g(y) }; g(k) { if(k prime) then f(k, k-1) else f(k, k-2) } (except that g is defined inside f), then it doesn't like it
CMC: Given 9 digits, output the check digits, as described in @Adám's webinar. You may output either the entire 11 digits, or just the last two check digits
@Adám I see pi and 42, then in the memory there is: pi, e, phi, avogadro's constant, 4 I don't know, then root 2, and I don't know the rest :P
Ah, googling gives them as: spoiler. Had heard of all except for 13 and 14 (and the unknown ones) before now, just didn't recognise their decimal expansions
idk, if you get lucky, you could stumble across the integer that disproves the Collatz conjecture. I'll be nice tho, and let you find it yourselves instead of telling you and spoiling it :P
@cairdcoinheringaahing OEIS tells me that 137035999 is spoiler but still no idea about 119814024
@cairdcoinheringaahing Speaking of, I rewatched Good Will Hunting the other day - still a great movie, but I now understand the math they were talking about that was "unsolved" until Will comes along, and... it's like, very basic graph theory stuff
One of the questions is literally "what is the adjacency matrix of this graph?"
> When asked for a problem that Will could solve, Kleitman and Bohman suggested the unsolved computer science P versus NP problem, but the movie used other problems.
Reminds me of a book i read where a guy has a friend who finds a way to factor primes in not exponential time or something…except the friend is actually a con man (spoiler alert)
@Fmbalbuena Most kolmos have an approach of "print this", but compressing bits that can be compressed. In order to be worth posting, there should be something unique and special about the output that means that are multiple approaches. Unfortunately, I don't see it for this one
Write a program that groups a string into parentheses cluster. Each cluster should be balanced.
Examples :
split("((())d)") ➞ ["((()))"]
split("(h(e(l)l)o)(w(o)r)l(d)(w)h(a(t)(s)u)p") ➞ ["((()))", "(())", "()", "()", "(()())"]
split("((())())(()(()()))") ➞ ["((())())", "(()(()()))"]
Input may ...
@DialFrost something I've noticed about your challenges that I think you should work on: loosen your input formats. instead of saying [given range, [numbers here]], let people take given range and the list of numbers here however is most natural for their language
This is good for two reasons: one, people don't like haing to deal with unnecessarily complicated input formats, and two: if you ignore the input format, the challenge difficulty has to come from the main task, instead of the input format making an easy challenge seem diffiult
@DialFrost I know, but it reminded me of a bit of feedback I've been meaning to give you
Sum Every two elements
Task
Your task is to Sum every two elements.
If there is a list and a number, evaluate [a1 + b, a2 + b ... aN + b]
But there is both lists, evaluate (the length of a is 2 and b is 5)[a1 + b1, a2 + b2, a1 + b3, a2 + b4, a1 + b5]
You must Flatten to array with depth 2.
Every ...
@SandboxPosts @Fmbalbuena this would be a better challenge if it was just "given two inputs, do the sum as follows" instead of making it about doing the sum for pairs of elements in the input
Can we reopen this so it can be hammered as a dupe of this? As noted in the comments, the first is just \$a(n) = 98a(n-1) + a(n-2)\$, so they're essentially identical, and closing it as a duplicate makes it more useful than leaving it closed as unclear
Ragged Matrix
A ragged matrix, is a matrix that has a different number of elements in each row. Your challenge is to write a program in any favorable language to find the indices of all occurrences of target in the ragged matrix.
Input:
A list of ragged lists (can be empty) of positive integers a...
5. Will the crime scene strands always be three bytes long? If not, can they be different lengths? Can one contain another?
I know a lot of these seem really nitpicky, but if it's not clarified, it's hard to know if your answer is valid
I think if you clarify all of these things and make it clearer that the input given is a test case and not the only possible input, it'll be reopen-able
Honestly, I'd recommend deleting it, reposting it in the sandbox while you make your changes, and then posting a new challenge when it's cleaned up.
That way you get a fresh start, without the downvotes and votes to close, and your in-between edits don't keep bumping it and sending it to the review queues
I'm actually really starting to like this pfp...it'll be a shame to have to give it so someone else for a little while when we do the Greater Profile Swap of 2022
> (if you don't watch im gonna name someone in my park after you and drop them in a lake and then save them right before they die cause i'd feel bad otherwise)
btw, @taRadvylfsriksushilani I mean I was very depressed when I took LOTS of time to think of this idea and it just got closed, so maybe like unclose it later, I'm gonna fix it now
@SuperByte Yeah, writing a good challenge is hard. I know it's easy to say, but try not to take it personally. Listen to the feedback, rewrite accordingly, and when it gets reopened it will be a much better challenge.
What: We swap usernames and pfps with other users, to confuse people Why: For fun When: Friday/Saturday Where: CGCC, or just chat How: Changing your username and pfp to an assigned one
@taRadvylfsriksushilani You said the crime strands were 3 bytes long: Untrue. I did it in python, and only 4 kb total, which is impossible since 3x3=9, so unclose it please
For the matrix one, it seems good, but possibly a dupe
For I/O, definitely be a bit loose, since some languages don't support ragged arrays as actual arrays (and would need to take them as a string representation of some sort)
im not sure what you mean, 1. very clear post: you know what to do, and everything is clear! I mean if you're in this challenge I mean you would get it
@SuperByte All right, then the challenge needs to say that. If you spell everything out in the challenge, then nobody will have to guess what the rules are. If people have to guess, somebody will certainly guess wrong.
@DialFrost This one? It's only been in the sandbox for 1 hour. Leave it for at least a couple days so people who are sleeping right now have a chance to see it--they may have feedback for you.
The task:
Given an integer n, find the next number that follows the following requirements
The next greater number is a number where each digit, from left to right, is greater than or equal to the previous one.
Consider \$1455\$, for example:
\$1 < 4\$
\$4 < 5\$
\$5 \leq 5\$
The next greater nu...
(It is true that some high-rep users have been known to not leave a challenge in the sandbox for long before posting it, but they have more experience with challenge-writing and know how to avoid certain common pitfalls. I still think any question can benefit from being sandboxed for at least 48 hours.)