« first day (3618 days earlier)      last day (1522 days later) » 

06:00
and you can reduce the intermediate value by doing %p inside the loop
I think I got the answer
Nope, not right :/
So if I understand it right, you have to use the other public key instead of 7 to get the encryption key?
With the loop size you get from the first?
06:05
uh no. you just take (other public key)^(loop size)
And modulo 20201227?
That's what I meant
function pow(n, x, b) {
  if (x === 0) return 1; if (x === 1) return n % b;
  const next = pow(n, x >> 1, b);
  return (x % 2 === 1 ? n : 1) * next % b * next % b;
}
this took too long
oh. then yes
06:06
Oh I was still using 7 as the initial value lol
Still not right though :/
Here's a screenshot of what I'm doing
(152... is the other public key and 441... is the loop size)
yes and
Not sure why that's wrong
consider
if loop size is 1
and subject is 2
what does this return
and is 2^1 equal to 4
:P rip
So form starts as 1, right?
off by 1 again
either that or i starts as 1 or < loop_size - 1
yeah, it must be initialized to 1
06:08
form starts as 1 yes
Still wrong :/
it's explicitly stated in the problem
@RedwolfPrograms if this is wrong it's likely your loop size is also one-off
you do increase the loop size by 1, yes?
damn, ninja'd
Okay I tried it with 7 and messed with it until I got the original pubkey again, it appears I did something truly special...an off-by-two error :p
ofc now I have to wait 5m to submit it
Not like it matters since my day 23 still isn't done
06:12
well, you have the time to do that while you wait xd
Definitely haven't spent 1h on it already lol
(not so) surprising fact: 80% of the people who solved d25p1 solved d25p2 (which means they all solved every problem)
> You have 3s left to wait
rip
Yes!
Got p1!
nice
I just need to do day 23 tomorrow, or maybe now
06:16
and you're still below me (though I'm 99% sure it'll be reversed as soon as you solve d23)
:P
im still below hyper or something
and tck
and barely behind manish
i'm just second to doorknob and i don't think anyone else can pass me? idk
well, tck is a global ranker, so :/
well i'm only global 4 behind him lol
that's insanely good overall
06:21
In day 23, do they mean "the cup labeled 1" or "the first cup in the list"?
> under the two cups that will end up immediately clockwise of cup 1
the cup labeled 1, obviously
wish i actually took this seriously earlier on; i missed 4 days effectively lmao
again. it's a circle
there's no first cup in the list because that "list" is a circle
and you can start anywhere on the circle
Just making sure I wasn't crazy lol :p
Okay I feel like it's not 9
06:23
three of my corners are in the same place
dude
how the heck am i earning so many hats by not going on SE sites???
i turned hats off cuz i kept getting spammed with like 4 hats a day just by existing
out of secret hats i have vexillilogist, balalaika and mariachi
isn't vexillilogy like
flags? i don't remember
or maps
06:27
@HyperNeutrino maps are cartography
I don't think I understand how linked lists work
Specifically moving items around
oh wait im dumb
@RedwolfPrograms [a.next, b[2].next] = [b[0], a.next]
@HyperNeutrino yea dont u deal with cartographers all the time
well i have been working on the cartography table a lot but i don't talk to the cartographers much recently
@ASCII-only Wait what's b[0]?
06:30
er
I think we're using much different implementations lol
visuals are best for thinking about linked lists
draw a chain of boxes and arrows, and think about where you break it and re-connect it
and then translate it to code
voila
I'm now getting around 300 billion instead of 9
Still wrong though
at least it shuffles things well
My current logic is basically:
var old = nexts[find[dest]];
nexts[find[dest]] = n_1;
nexts[current] = current = nexts[n_3];
nexts[n_3] = old;
Where nexts is an array of next indices and find is just the index of the dest label
06:39
i still advise strongly against using indices.
^
they're literally just dead weight
What are the alternatives?
it's a linked list
it's a linkedlist the point is that indices aren't a thing. it's just overcomplication especially with circular
@RedwolfPrograms just store a hashmap/array of next values
like a[x] = y means y comes after x
Oh yeah. Wasn't sure if that would work but I guess it makes way more sense than what I'm doing now.
YES!
I finished!
Thanks for the help with linked lists, and all of AoC in general really :p
06:48
nice job, you win
 1) 2605 *************************  tckmn
 2) 2494 *************************  hyper-neutrino
 3) 2392 *************************  Manish Kundu
 4) 2390 *************************  somebody1234
 5) 2324 *************************  anna (AoC++)
 6) 2298 *************************  RedwolfPrograms
 7) 2253 *************************  UnrelatedString
 8) 2234 *************************  pppery
 9) 2233 *************************  Bubbler-4
10) 2123 *************************  ngn
4
ngn
ngn
oh no, last :)
the ranks are pretty much settled
i did so badly
:p
When UnrelatedString and pppery finish day 20 they'll probably pull ahead
yeah, except that one
06:50
oh no
it is on
in like two hours when i figure out day 20 :P
I spent 5 hours debugging the stupidest bug ever, by the time I actually got the image put together I was so excited I couldn't even type for like ten minutes :p
I'm quite satisfied with it, given that I used a new language and I had to constantly go through the docs to find the things I need
except for totally missing day 13, of course
I got 5 top 100s, which I guess is ok for my first time
how the heck
I'm quite satisfied because this is my first AOC
06:53
i think i've done every year lol. maybe missed one in between but i think i did 2015
not that i was any good at it, but
SE chat suddenly decided not to autoscroll and it is annoying me so much
 1) 3221 *************************  tckmn
 2) 2763 *************************  hyper-neutrino
 3)  434 *************************  Manish Kundu
 4)  376 *************************  somebody1234
 5)  232 *************************  pppery
 6)  170 *************************  UnrelatedString
 7)  162 *************************  RedwolfPrograms
 8)   90 *************************  Bubbler-4
 9)   90 *************************  ngn
This one is sorted by global score
@RedwolfPrograms refresh ezpz
Probably what the result will be when they finish day 20
ngn
ngn
it was a single blow - i got score 90 on one part of one problem and 0 on all others
06:54
@HyperNeutrino im lazy so i did this year without a lib lel
lb'd 9 times
so how many people got in the global leaderboard?
although most of them were terrible (<20)
06:55
2 got on global leaderboard
cutoff is like 600 global score
10)   83 *************************  Jonah
11)   33 *************************  anna (AoC++)
We have 11 users who have nonzero global score
i wonder if most top rankers use some sort of library or template or if they're just fast lol
@HyperNeutrino well betaveros is just fast i think?
library would be op af tho
Thinking of two CnR challenges
06:57
idk if i should even bother making a template for next year
73) 808 Jay Foad (AoC++)
I guess at least one player is using vanilla APL to go this far
@Bubbler this man is so fast it's unfair
it's helped me a few times and tbh it's probably not worth starting without a clear mind
AoC being over is such a relief, I was kind of stressed about getting day 23 done lol
cuz tbh every time i start i always start streamlining my thoughts into how my template can optimize my code
06:59
my entire body shivered every day as 2PM came close
probably I shouldn't go for a competition like that
where the heck do u live

« first day (3618 days earlier)      last day (1522 days later) »