Sometimes a question is underspecified or ambiguous. Other times a question is fully specified but very long and dry to read. In between there are questions which seem perfect - all the information is there but it's also a joy to read, and makes you want to start thinking about possible answers r...
@Doorknob冰 you should really think about a shorthand for 256 in Ostrich... it's the single most common 3-digit integer (I think... maybe 100 is pretty common, too), and all ways of computing it also require 3 bytes in CJam.
[ is actually a bit more subtle than that... I think it's more like "remember which elements are on the stack right now and exclude them from the array"... because if you make the stack smaller in between and then grow it again, the new elements will end up in the array as well. so if you don't care about the order, you can put the top two stack elements in an array with [\]
I was wondering if a score-counting challenge for Kingdom Builder would be too much
it's on a hex grid, and for each game you have 3 out of 8 scoring mechanisms (plus 1 which is always used)... so you'd have to implement those 9 scores on a hex grid, plus a bit of code that selects the relevant scores based on the given input.
@MartinBüttner Is it just a matter of calculating 8 scores and using the 3 lowest, plus the ninth, or is there opportunity for guessing from 1 score that you don't need to calculate a certain other?
This is Weekly Challenge #1. Theme: Audio Processing
Your task is to write a program, which writes an audio file to disc (in a format of your choice), which contains the Morse code for 2015, i.e.
..--- ----- .---- .....
You are free to choose any sort of sound for the segments, like a single-...
Computer Generated Walls
The paint on the walls in my room has a random, almost fractal-like 3-dimensional texture:
In this challenge you must write a program that generates random images that look like they could be part of my walls.
Below I've collected 10 images of different spots on my w...
In number theory, and especially the study of diophantine approximation, the lonely runner conjecture is a conjecture originally due to J. M. Wills in 1967. Applications of the conjecture are widespread in mathematics; they include view obstruction problems and calculating the chromatic number of distance graphs and circulant graphs. The conjecture was given its picturesque name by L. Goddyn in 1998.
== The conjecture ==
Consider k runners on a circular track of unit length. At t = 0, all runners are at the same position and start to run; the runners' speeds are pairwise distinct. A runner is said...
@MartinBüttner how would you make it a coding challenge? Set k>=8 and reward the code the finds a combination of speeds that gives the longest time before loneliness? Reward the code that finds a combination of speeds that gives the widest maximum separation (even if it is just short of loneliness)?
It seems like a good candidate for some kind of challenge as it is deceptively simple (sounds simple enough to encourage people to take part, but is known to be hard enough to create interesting competition). Maybe ask @PeterTaylor what particular challenge would avoid having an "obvious" optimal solution. Althought the problem itself is obviously hard, the scoring types I mentioned might not necessarily be hard to deal with.
Note - I will probably name this something like Curator's Dilemma - Suggestions in comments as well as if you like/dislike this question.
Introduction
You are a friend of a curator for an art museum, who has had the recent delight of getting modern art from four artists (some of which may give ...
@MartinBüttner That does look very interesting, no idea how I'd solve it with CJam though. Sorry for the long time though, Stack Exchange chat randomly broke. Note, if you see double posts, please do tell me. When I post another one flickers up, it's very strange.
@PopeyGilbert I've got an idea for CJam. Each tile is mostly just a generalised quine. But the quine block starts with something like ]W= to raze the stack from previous tiles. Then in the block you can build the layout in a variable like L and afterwards solve it. Solutions for incomplete grids just get discarded later one.
To take care of line breaks, you start the tiles with 0 (or something) and end them with '. This way, you can check the second-to-top element of the stack if it's '\n or not to know when you have to start a new line in the layout.
an ATM machine here gives 100, 500 and 1000 notes. with some rules on the number of each note for a given withdrawal amount. Your task will be to make certain withdrawals so that you have at least required number of each of 100, 500 and 1000 note
@Optimizer Uhh, I just sent a "contact us" form explaining a bunch of them, and [insert CM here] said that one of them was correct. So, I'm not sure. :P
@TheDoctor "Figure out" as in "find out how to get it."
@Optimizer It's given to whoever can deduce at least part of how to get a secret hat without spoilers or other assistance.
(incidentally, I tried to say "Eureka is for figuring out how to get a secret hat so gimme nao" but apparently Eureka explicitly disqualifies figuring out Eureka this year, since it existed last year as well. :P)
@MartinBüttner Huh, it said "Request Timeout", so I clicked retry. That must of been why there was a double post. Which also means that there's a problem coming from stackexchange.com to my client.
A quick Python 3 solution tester for optimizer's challenge. pastebin.com/9hs2jzh6 - You can run it here - His challenge is detailed above and may have already been posted. Hopefully this may help someone.
Related to this question.
It's finally 2015. With the New Year comes new challenges.
Goal:
Print the number 2015 in the shortest code (in bytes) possible.
Limitations:
You cannot use any of the following digits: 0123456789
You cannot use any time or date variables
The programming language y...
The new year, 2015, is here. With it comes new challenges.
Goal:
Take an input, STDIN, and produce the number 2015 from it.
Guidelines:
Assume that STDIN is any number from -∞ to +∞
Your code must take STDIN as input and always return 2015 as an integer
Twist:
I am immediately eliminating...
@JamesLynch start afresh? if you want the challenge to always print 2015, then taking input doesn't make sense to me. but if it only outputs 2015, it's a duplicate of the old one. so either you can either come up with a novel restriction to make outputting 2015 interesting again (which, I think, will be pretty hard), or you could think about making the output variable.
that being said, writing good challenges is hard, and it happens fairly regularly that you have an idea only to discover it's already been done. so if you keep getting negative feedback for your ideas, don't despair ;) ... I suggest you hang around the site for a while, participate in some challenges, and have a look around what makes a good and innovative challenge.
Back in May I posted my first (and only) answer to StackOverflow. Today I posted my first (and only) question to StackOverflow, and I got an upvote on my answer from back in May. ???
Golf me some cash from the ATM
code-golfcombinatorics
The task is simple. Get me some 1000, 500 and 100 notes.
How ? you might ask. Don't worry, no need of robbing a bank as there is an ATM nearby which accepts your credit card. But your credit limit is just enough for the task.
Challenge
Gi...
@githubphagocyte I think that the longest time before loneliness would (at least if taking the number-theoretic version of the conjecture) be equivalent to a question which was posted not too long ago (but IIRC deleted by the poster for reasons which weren't obvious) about finding a tight cluster of coprime numbers.
Simply asking for the time at which the last runner is lonely, given an array of input, would make a simple code-golf question.
Thanks @PeterTaylor I'm guessing that the previous question being deleted means that wouldn't be classed as a duplicate? It was @MartinBüttner who brought up the topic of the lonely runners but I think you've just missed him. Sounds like there could potentially be more than one question based on this.
It wouldn't be, no. And it's probably been long enough that I should stop hoping that whoever it was will undelete it. It was a more interesting question the more I thought about it, so I wouldn't be against something equivalent being posted.
oh, even for the combination that gives longest time until loneliness?
I thought that sounded difficult enough to be worth a code-challenge (seeing that it's unsolved)
though a code challenge would have the usual problem of "find the largest n within x minutes", namely searching in your own time and then starting the search in the right place
I think that if you assume the conjecture, it's probably not hard to show the equivalence to the tightly bunched coprime number problem, and that's relatively easier.
(I admit that I haven't attempted a proof: I've been catching up on e-mail and thinking about knishops)