« first day (3608 days earlier)      last day (1242 days later) » 

4:51 AM
Less than 10m to AoC
 
8
7
 
Beat you!
 
5
 
4:56 AM
4
 
3
 
spam
:|
 
It's the good spam™
 
4:58 AM
1.5
 
1
 
½
 
@RedwolfPrograms i g it should be NM (never mind) instead of TM :p
 
1/6
 
ngn
5:00 AM
-1
 
doing so badly
 
27/48 :c
 
>:(
53/108
lel im dumb and bruteforced part 2
 
is there even a smart sol to part 2
 
almost certainly
 
5:11 AM
i figured O(N) would be fast enough cuz 1 mil in 1 sec is standard so 30mil is fine
 
but who the heck is going to bother when brute force works
i used js so it gc'd once cuz it hit 4gb ram lel
 
lmao
i wish i did the O(N) brute force the first time
 
how to speed up brute force?
 
might lost like a few ranks max first part but then i could just use the same code for p2 and save a lot and maybe get a better rank
 
@Lyxal memoization again
except keep only the last two indices
 
5:13 AM
y'all struggling to make it fast while i'm for some reason not able to make it work at all lmao
 
Mine's using over a GB of memory at 4m...how do I do this efficiently???
 
never mind i just did something dumb with my loop
this is part 1 by the way
also i just used an example output instead of my real input because iforgot what i selected
 
@Razetime o smart
 
hashmap is the answer again
 
106/1286
 
5:24 AM
805/1119
 
And I found part 2 completely uninteresting, because it looks like you have to do something clever to make it faster, but you don't.
I had to rewrite my part 1 algorithm because it was keeping all past values in memory needlessly
 
22 hours ago, by ngn
35 mins ago, by ngn
is there anything better than bruteforce for today's part2?
 
my part 1 was using .index lmao so it was O(N^2)
so i just used a hashmap instead and it was fast enough lol, idk how else i'd do it
 
540ms in js
no need for hashmap
array is fastest obv.
 
I thought about .index, but I realized that it would get confused when the same number appeared more than once.
 
5:27 AM
factor of like 60 speedup from original part2 so im happy enough
so tldr: all you need is an int[]
 
 
well using an array as a hashmap effectively. i "preallocated" 30 million spaces just to be safe, not that they'd ever get used
 
i forgot about that
lol
oh well idc to go back and optimize it anymore lol
 
as usual. my solutions on my hackmd (including fast one). if anyone really wants to see i can repost link
 
yesterday, by ASCII-only
my solns are in my hackmd as usual
 
5:34 AM
Were y'alls results in the ten or hundred thousands, or millions?
Never mind, got it!
Day       Time  Rank  Score       Time  Rank  Score
 15   00:05:45    96      5   00:34:22  2276      0
96th pog (also huge fail on part 2 :p)
 
Mine is over 20mil
 
Mine was like 13k
 
mine was 60k
 
For the past few days, I've done super well on part 1s, but awful on part 2s
 
that was an embarrassingly long debugging process
 
5:36 AM
Same here
 
mine was 24m
 
ew debugging
 
Day       Time  Rank  Score       Time  Rank  Score
 15   00:17:41  1691      0   00:36:17  2423      0
lmao
had like five different kinds of off by one errors lmao
 
So did I
 
lol same
 
5:37 AM
LLLLL
 
Off by one is the most annoying type of error IMO
 
i did pretty badly tbh
Day       Time  Rank  Score       Time  Rank  Score
 15   00:04:37    53     48   00:09:35   108      0
 
especially cuz i always fix it the wrong way somehow
 
I always have to stop and think if I should use < or <=
Or < x - 1
 
Day       Time   Rank  Score       Time   Rank  Score
 15   00:03:51     27     74   00:07:56     48     53
 
5:38 AM
@RedwolfPrograms laughs in Python
 
laughs in custom range function I keep forgetting to use
 
still ~80pts from leaderboard
sad
 
F
wait how did i go up this much from yesterday
 
global leaderboard?
 
5:40 AM
it's because most people are inconsistent with lb. and you got 127pts today...
 
i was 33rd yesterday iirc? unless i forgot to check
actually wait
i don't think i checked yesterday after getting 1/11
 
betaveros #1 again by 3 points
 
Okay JS's typed arrays were the only reason my solution ran in under a year
 
er
i could try typed arrays
might make it sub 100ms
but eh <1s is fine
 
How are y'all's so fast? Mine takes like ten seconds with every optimization I could think of...
 
5:44 AM
tckmn still going as strong as ever
 
@RedwolfPrograms you're using the wrong data structure
and keeping too much data
 
120MB isn't that bad, right?
In a giant typed array, with one element for every possible value of the accumulator?
 
it's not
 
mine takes 17s
 
my part2 used 4gb or something
afterwards should be 120mb or 240mb who cares
 
5:49 AM
after i optimized with an array instead of dict
 
20 seconds with a hashmap, 2.6 seconds with a pre-allocated array
 
I have a chromebook with 2GB of memory, so...:/
 
in Factor it is
 
i used an array and it takes 540ms bro
 
h
maybe i am just dumb
 
5:49 AM
check my soln, link is above
 
Factor has low-level arrays, but I guess I won't bother
 
i don't think my sol is that much diff than yours???
is python just slow
 
yes
use pypy
python lacks a jit is why, i think
 
lmao i forgot pypy was a thing
1.3s
 
yeah, python is not known for runtime speed
 
5:51 AM
lel
 
I tested it on my computer, it was something like 25 times slower than C, while JS was only about 5 times slower
 
that's why I use python at daily job so that I can legitimately slack for an hour
 
nice!
 
6:06 AM
wow y;alls are fast
mine took 1 min 30 on a sample input
running it for real now
 
6:21 AM
inb4 "wrong answer"
 
inb4 his ram is on fire
 
@Lyxal what
 
Well, if it takes 1:30 on a sample input, it would take around the same time on real input too
 
Oh yeah on this day it doesn't matter
 
6:43 AM
@Bubbler sike I got it right
@ASCII-only that's Minecraft's job
@Bubbler yeah it pretty much did
 
 
2 hours later…
9:06 AM
1
Q: Can the statues be stacked?

Kevin CruijssenInspired by this stack of little statues that are currently on my desk at work, given to me by my colleagues from Sri Lanka when they visited The Netherlands: Challenge: Input: \$statues\$: a multi-line string (or character matrix), containing only the characters \n|-# (where the # can be anoth...

 
 
4 hours later…
12:52 PM
1
Q: Possible binaries sum

vrintlePossible binaries sum This challenge is inspired by the AoC 2020, Day 14 - Part II, created by Eric Wastl and his team, which asks to output the possible binary values from a bitmask. Let's say we've a bitmask like "10X0X0", then we've to find the possible binary values that can be generated by ...

 
ovs
@KevinCruijssen I had some fun solving your challenge ;) gist.github.com/ovs-code/25e810fb0818078cf9f9b08133b76334. But I guess I can recycle most of this for both parts
 
1:17 PM
1
Q: (1) Determine the amount of statues

Kevin CruijssenInspired by this stack of little statues that are currently on my desk at work, given to me by my colleagues from Sri Lanka when they visited The Netherlands: This is split into two different challenges due to popular demand: Part 1) Determine the amount of statues (this challenge) Part 2) Can t...

 
2:03 PM
@ovs wowo
 
 
1 hour later…
3:15 PM
3
Q: Chess murder mystery

A. RexYou know which kinds of chess pieces were murdered. Can you come up with any possibility for who killed whom and how? Background During the course of a game of chess, there are between 2 and 32 pieces on the board. Call the collection of all pieces on the board (both white and black), without r...

 
 
1 hour later…
4:38 PM
Recently checked out xiaowu's porfile
and his paradoc language looks really golfy
Kinds strange nobody uses it now
 
 
4 hours later…
8:21 PM
Day 8 is about to overtake day 7 in completions
The difference is 13 people (out of more than 50k), and it's been steadily shrinking
 
8:32 PM
wow
 
8:49 PM
Only 5 away now
 
9:12 PM
Who tf keeps changing the question colours?
Like seriously, pick a colour and stick with it.
(this is on mobile site BTW)
They used to be blue, then they were a weird shade of brown/black and now they're green
 
9:30 PM
Day 8 passed day 7!!!
 
1
Q: A Snake, A Camel And A Kebab

ScottAs many of you will know, almost every programming language has a standard casing system; unfortunately, we have not been able to agree on a singular system to use and now must frequently switch between camelCase, snake_case, PascalCase and kebab-case. Now I know what you're thinking... wouldn't ...

 
9:48 PM
They make 1 TB micro SD cards...
 

« first day (3608 days earlier)      last day (1242 days later) »