« first day (3609 days earlier)      last day (1228 days later) » 

3:53 AM
0
Q: Find the missing number in a range of numbers

Joshua CrottsQuestion: Given a String s of randomly-shuffled numbers from m to n such that -100,000 <= m < n < 1E9, your job is to find the number that is missing from the group. Note that the string can be randomly-generated, and the below cases are only an example of what that string may be. This input mean...

 
Winter bash time!
 
and AoC is coming again
 
4:12 AM
@RedwolfPrograms can phones even handle that amount
 
Definitely not
 
meanwhile, just solved a PE problem after n years of inactivity
the most satisfying moment in this year
 
Project Euler?
 
yes
 
4:31 AM
Why did a post I edited three minutes ago get sent to me in the VLQ queue by the system...
 
@RedwolfPrograms don't trust the system
 
More like the system doesn't trust me I guess
 
More like the system doesn't like code-only answers with no explanation.
Even the community user doing CommonMark migration caused low quality post reviews.
And the system can't not trust itself.
 
That is the basis of any good system
But I get what you mean lol
 
It's the basis of any good system to distrust itself?
 
4:36 AM
sort of. i think any good system should enforce consistent policies even if it invalidates itself
like i think the system should ideally be consistent across all parts, so community shouldn't cause VLQ
but if community does something that another user would trigger VLQ on, the VLQ detection should report it even if the system itself did it
 
4:50 AM
10m to AoC
 
9m to AoC
 
4
3
 
get ready for me to get rank 100k
 
4:58 AM
2
 
time to choke again
 
same
 
.5
 
4:59 AM
0
 
ugh
yucky input
204 p1
eval ftw
 
2/3
wow
wew
wow part 2 is hard today it seems
oof i missed rank 1 by 41 seconds
 
no, it just takes a bit of thought
 
could've saved that if i did the correct approach initially :/
part 1 by 18 seconds, idk if i made a mistake that could've gotten me there or if i just got beaten by a better opponent
either way, can't be disappointed, lol. seems like 1/1 was so close yet so far, but i'm happy with today's result
 
5:15 AM
:( part2 i cant do
 
lel rank 110
part 2 needs sets that was the problem.
disgusting.
oh well, rank 110 is more than i can ask for
 
oh yeah python sets are OP for stuff like this
 
>:(
 
5:27 AM
python is imo one of the better languages for aoc
complex numbers for coordinates
sets for stuff like this
 
I feel like I got p1 right
but I cant find anything wrong with my answer
 
I can't figure out why my p2 is wrong and there's no useful test case this time
 
sets
 
What do you mean
 
er nothing
 
5:36 AM
369/609 poggish
 
or more like you cant just do indices_for_properties[property] = indices.first(valid for x property)
 
I just got an array assignment backwards because I use one letter variable names for this and my brain just turned into types of pasta we have no name for
 
It probably varies per person
 
I don't have the same order
 
5:38 AM
oh
 
my friend and I have literally identical inputs today
 
I'll look at it later probably
 
I feel like I should not be brute forcing through 2432902008176640000 possibilities
hmmmmmmm
 
...
have a slight idea that might not work too well
 
5:48 AM
Today's part 2 has multiple possible approaches but only one works very well I guess
1983/1113, started late but managed to write a 10-line function in Factor successfully
 
i'm currently trying to narrow the field down for each index then work from there but it doesn't seem like it's narrowing enough
it's definitely narrowing to some extent because 104857600000000000000000000 is a hell of a lot bigger than 2432902008176640000 but they're both pretty damn big
 
wait how are you getting that many cases
 
shitty mixed base conversion that i wrote on the assumption that it wouldn't have half that much to check
 
There is a clear pattern in the possible mappings between column ranges and data columns, if you visualize it well
 
@Bubbler ...I could try that
 
5:53 AM
i recommend printing out the possible slots for each field name and then seeing how you can get it in O(N^2) from there
 
It's O(n^k) with sufficiently small n and k, so it is expected to finish instantly with the right approach
Dec 9 at 5:41, by Bubbler
I'm waiting for the moment the difficulty skyrockets, so I have a better chance of higher rank
I didn't mean this kind of difficulty, I want some more mathy challenges >:(
 
oof
this sort of stuff is perfect for me cuz i can speed code a bunch of silly ad hoc stuff that doesn't need to be hyper-optimized
 
lol
wow, can't believe I got a rank as not-completely-awful as 2009 after more than an entire hour
...after getting 207 on part 1
 
it was a rather annoying prob lol
 
6:08 AM
Is it a fair assumption that only one "column" of other tickets correspondes to only one rule?
 
I don't know why it took me this long to realize that there has to be only one possible arrangement, and that there's no other constraints to consider
@Lyxal assumption? that's a given lol
 
is it possible for a set of constraints to be reducible but have no field have exactly one valid slot
 
if there was no single slot that only satisfies one field's constraint then there would be no unique assignemnt of fields to slots
 
My idea is that for each field, identify the column where all numbers fit the rule. Then, sort by that index
 
0
A: Sandbox for Proposed Challenges

TheProgrammerThe Missing Number arithmeticcode-golfnumber Question: Given a String s of randomly-shuffled numbers from m to n such that -100,000 <= m < n < 1E9, your job is to find the number that is missing from the group. Note that the string can be (and generally is) randomly-generated/constructed, and the...

 
6:11 AM
so if you had something like that then you'd just have to try the multiple possibilities lmao
 
YES
I got it
 
@UnrelatedString but would it theoretically work?
 
@Lyxal I doubt your input was constructed to admit multiple mappings
 
It could be solvable without getting the exact mapping because you just need to identify destination-columns and the rest
but then the difficulty really skyrockets
(or gets easier?)
(because then you can get a valid mapping out of gazillion possibilities by brute force and get the answer from that)
 
it wasn't that hard to figure it out once you know set intersection is useful
 
6:16 AM
i just used O(N^2) set differences lol
 
thankfully this didn't give me a WS FULL
 
CMC: Find two finite sets A and B with a bijection F : A -> B such that there exists a mapping M from A -> P(B) such that |M(a)| >= 2 and F is a unique bijection such that F(a) in M(a) for all a
i am not sure it's possible, but i haven't proven it's impossible yet
 
I think it's impossible for |M(a)|=2
Induction on |A|. If |A|<=1, M trivially does not exist. If |A|=2, the only possible M is each value of A being mapped to the entire B, so F is not unique.
For |A|=n≥3, pick a value a of A and let M(a) = {x,y}. If M(b) ∩ {y} = empty for all b ≠ a, F(a) = y is fixed, but then there must be an F' and M' going from A-{a} to B-{y}. Contradiction.
 
6:36 AM
oh, that's a nice proof
okay. i had a feeling it wasn't possible; intuitively felt like it
 
Otherwise, pick another value b of A so that M(b) = {y,z}. If x=z, F is not unique. So x≠z, but then there must be F' and M' going from (A∪{c})-{a,b} to B-{y}
 
(you can substitute two mapping pairs M(a)={x,y} and M(b)={y,z} to M'(c)={x,z})
 
i'll need to look that over a bit more, brain is not working too well rn and when it does i need to keep working on my final assignment
 
The last step is probably not rigorous
fixed version: If there does not exist a pair M(a) = {x,y} so that M(b) ∩ {y} = empty for all b ≠ a, every element of B appears exactly twice in M. Then we conclude that {x,y} is part of a cycle, which makes F non-unique.
 
7:14 AM
1
Q: Help me compress this song

jgosarin my country we have a children's song which goes like this: Priletela muha na zid, muha na zid, muha na zid. Priletela muha na zid, muha na zid. Pralatala maha na zad, maha na zad, maha na zad. Pralatala maha na zad, maha na zad. Preletele mehe ne zed, mehe ne zed, mehe ne zed. Preletele mehe...

 
 
3 hours later…
 
1 hour later…
11:26 AM
@RedwolfPrograms got your hat on yet? I guess I need to reload the chat room to see hats here?
 
 
2 hours later…
1:06 PM
0
Q: Is there a more concise way to use the Santa emoticon [}:]>* programatically in a raku one-liner

p6steveraku -e 'sub santa($x is copy){$x~~s/ <[}:]>* /claus/; $x.say}; santa(":")' #OUTPUT claus Merry Christmas to one and all (and any)

 
1:19 PM
0
A: Sandbox for Proposed Challenges

user38141Animal-Alphabetical Sequence The Animal-Alphabetical Sequence is an infinite string of letters built accordingly to the following procedure: Start with the letter A; Replace each letter with the name of the animal starting with such letter in the table below; Go back to step 2. For instance, th...

 
@Neil I'm waiting for an interesting hat to put on :p
 
if someone have feedback for Equality up to Swapping tell me please, first question
 
@榨菜 I'm not very well versed on the math notation, but it looks good
 
but you can understand it? it's difficult to describe with
words
 
not very well, no
does anyone know how to use PMA/Snails?
 
1:31 PM
0
Q: Equality up to Swapping

榨 菜inputs / outputs your program/function/routine/... will be a predicate on two tuple sequences; call it relation ≡. for the purpose of simplicity we use natural numbers: the input will be two list of pairs of numbers from ℕ (including 0); call them Xs and Ys the output will be a "truthy" value s...

 
@Razetime :(
you compare lists with (a,b) in it for equality. but you don't care about order of (a,b)s
you can permute the (a,b)s by swapping except you can never swap (a0,b0) and (a1,b1) if a0=a1
 
What the heck, someone just invited me to a "Room for ___ and Redwolf Programs", and I checked and they have like 10 for other people
 
@RedwolfPrograms huh, I already have a secret hat for some reason
 
1:49 PM
@Neil it's the one you get for wearing a hat on any site
 
You get a hat for wearing a hat? My head hurts.
 
@Razetime thanks
@NewMainPosts this tab keeps confusing me into thinking there's a new question
 
 
1 hour later…
3:12 PM
2
Q: Count how many times your program repeats

Redwolf ProgramsYour task is to write a program or function. It's output/return value must follow these rules: The program outputs 1 The program repeated n times outputs n The program backwards outputs -1 The program backwards and repeated n times outputs -n A mix of forward and backward programs will output nu...

 
3:29 PM
@NewMainPosts Is this question about checking if the same set of points are in both array? Just shuffled in each array..
 
@Adám done
 
Thanks!
 
4:15 PM
contemplating on whether it is worth my sanity to make a brainfuck interpreter in Husk
 
4:40 PM
@NewMainPosts Can someone explain why this isn’t a dupe of all of the other “compress this song” challenges before I find one to VTC?
Oh cool, when did hats start?
 
Yesterday
 
> Snaphat
Answer in 30 minutes, +3 and accepted
That's not going to be awarded here :P
 
First thing I thought :p
 
Does anyone else have the Cordovan hat? I haven't properly been on the site for a few days and it just tells me it's a secret aht?
Also, yay, my badge count is 5, 50, 150 :D
 
5:31 PM
I've got the Cordovan hat too (I'm wearing it). Not sure what triggered it, though.
 
5:45 PM
@cairdcoinheringaahing now to find an excuse to make a challenge based on that
 
Is there a challenge where you take a list like [2, 4, 1, 6] and return a list where each item is repeated n times, where n is the previous number ([2, 2, 2, 2, 2, 2, 4, 4, 1, 1, 1, 1, 6])?
 
6:03 PM
@Razetime Given n (5) and m (150), output whether it is possible to get from n to m by appending or pretending a single digit at a time
 
 
1 hour later…
7:23 PM
CMC: Take a list of positive integers, and return a list containing each of those numbers repeated a number of times specified by the previous number...basically the same as my above comment
Example: [2, 4, 1, 3] -> [2, 2, 2, 4, 4, 1, 1, 1, 1, 3]
 
so it wraps around? [1, 2] -> [1, 1, 2]?
 
7:41 PM
@RedwolfPrograms APL (dzaima/APL), 6 bytes ⊢⌿⍨¯1⌽
¯1∘⌽⌿⊢ works too.
 
8:04 PM
done. It's not 6 bytes, but it's readable :ſ
 
@Wezl You find the APL code hard to read?
 
not for apl code, but yes for english
 
If you read the APL symbols as English words, it is pretty neat: self replicated by ¯1⌽one-step-left-rotation.
 
but you have to know how replicate works
 
@Wezl Or seen from the other side, you have to know what the English word replicate (or repeated) means.
 
8:20 PM
if I showed it to someone in my family, they'd think it was mojibake, not code. But I surrender that it is very readable for APL and lisp is too parenthesised
 
@Wezl Ask them what's more readable of ×/n-2ׯ1+⍳⌈n÷2 or
 
@Adám The graphical representation is almost always going to be clearer.
That doesn't mean it's optimum; a graphical representation of APL would probably beat both.
Something meaning “reduce with ×” is always going to be easier than “capital Pi”.
 
@Adám … No.
 
@Adám the phi, macron, /, and unmatched floor/ceilings are going to confuse someone who knows traditional math notation
 
8:35 PM
@Wezl Sure, but that's because they already know those. Which do they think would be easier to learn and use?
 
The graphical mathematical notation has four clear sections.
 
@Adám i'd say the 2D nature and clearly separate structures work in favor of traditional math notation, rather than against it here
 
@Adám out of TMN and APL?
 
@Wezl Yeah.
@wizzwizz4 Yeah, it is actually interesting that TMN uses ∏ but e.g. ⋀ and ⋂. Why not use ⨉?
 
@Adám Historical reasons.
When APL starts pushing 200 years of radical change in which parts of maths people are interested in, you'll understand.
 
8:43 PM
Oh, already after 50 years, APL has issues, and it is high time for a rethink.
 
 
1 hour later…
9:52 PM
I'm 100 away from top 25 in winter bash hat game
 
@RedwolfPrograms where are the rankings?
 
Leaderboard, linked under the play button
I'm top 20 in play time for suffering through 20 minutes of this
 
10:19 PM
0
Q: Model Checking, verification

citizenkane99 Build a model for the counter that counts the number of times a variable has the value 1 modulo 8 with binary variables in GCLang. In other words, one of your variables should be a free variable, and the transitions of the counter should depend on the value of this free variable. Keep in mind th...

 
10:33 PM
81
Q: "99 Bottles of Beer"

GamrCorpsWrite a program that outputs the lyrics to 99 Bottles of Beer, in as few bytes as possible. Lyrics: 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall. 98 bottles of beer on the wall, 98 bottles of beer. Take one down and pass i...

 

« first day (3609 days earlier)      last day (1228 days later) »