Enterprise Quality Code!
Summary of this challenge
Print (to make it more fair when competing with another language changing the output method could be a trivial way to golf) the first N Prime numbers. Your score will be the sum of the byte counts of all entries which no one has been able to go...
@βετѧΛєҫαγ @ConorO'Brien I posted it on the sandbox and it seemed quite clear to those reviewing it. Although the tags may seem contradictory at first glance, perhaps the comment I left to Dennis may clarify it
1. So basically the accepted answer goes to the shortest answer in Unary? 2. The tags code-golf and code-bowling are mutually exclusive. This isn't really either. — Peter Tayloryesterday
Anonymous
For a simple challenge (like output the nth element of a sequence), 24 hours might be fine. For more complicated challenges, not even close.
And if you would read the post, and further comments, I talk about how the submissions are limited to fitting in one post. Thus the highest length is 30k a unary submission would most certainly not fit in 30k
Anonymous
There's no limit in the actual challenge to the length of the solution
Introduction
Let's start by arranging all fractions from 0 to 1 in order of lowest denominator, then lowest numerator:
1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6, 5/6, 1/7...
Note that duplicates aren't counted, so I haven't listed 2/4, 2/6, 3/6, or 4/6, since they already appeared in th...
Pick any language X, but please avoid selecting a language which is just another version or derivative of another answer. If there is no existing answer in language X than you will write a program (which must fit into a single post) that solves this challenge. The length in bytes of the source (in any reasonable preexisting textual encoding) will be added to your score. You must avoid using any unnecessary characters for reasons that will soon become apparent.
If language X already has been used to answer this question, then you must answer using any permutation of any …
note the (<b>which must fit into a single post</b>)
@Mego I agree about minimum scores, but I can see the sense of having a maximum score in this case, otherwise the winner is just unary with no competition
@El'endiaStarman Parses the transcript into a list of messages with likely replies (direct replies, pings within the next hour, and messages directly after) and then assembles a BK tree out of it
@RohanJhunjhunwala For what it's worth, I think this is an interesting challenge type, and I'd like to see it refined so that it can be a good fit for the site. The trouble is that it is similar enough to several other challenge types that it will need a very clear description in order to avoid confusion. I'd recommend keeping it as short as possible without missing anything out, and using bullet points to emphasise the unique aspects.
1. Alice posts code of length N in language X. 2. Bob cannot post shorter code in language X until it is a permutation of a proper subset of Alice's code. 3. For language X, the winner is the shortest code posted. 4. The overall winner is the person with the highest score, being the sum of all the individual scores for languages in which they won.
@RohanJhunjhunwala If you could open the challenge with a bullet point/numbered list style description of similar length, I think it would avoid people thinking the scoring mechanism is something else
def bk_query(message, tree):
d = distance(message, tree[0].content)
if d < THRESHOLD:
yield tree[0]
for node in tree[1][d - THRESHOLD: d + THRESHOLD]:
if node:
for match in bk_query(message, node):
yield match
@Dennis it does say "Write a program" in the challenge description, but it is buried somewhere in the wall of text. Should I open it up to functions and programs?
A BK-tree is a metric tree suggested by Walter Austin Burkhard and Robert M. Keller[1] specifically adapted to discrete metric spaces. For simplicity, let us consider integer discrete metric
d
(
x
,
y
)
{\displaystyle d(x,y)}
. Then, BK-tree is defined in the following way. An arbitrary element a is selected as root node. The root node may have zero or more subtrees. The k-th subtree is recursively built of all elements b such that
d
(
a
,
b
)
...
@RohanJhunjhunwala By default, challenges are open to both programs and functions. It's up to you whether to restrict to just programs, but the consensus on meta is that you need to specify "full program" explicitly, otherwise it will be assumed that you also include functions, if you just say program.