Author Topic: Advent of Code  (Read 112389 times)

Re: Advent of Code
« Reply #825 on: 04 January, 2020, 09:37:40 am »
(I have all 250 stars, be interesting to see the stats on how many people have done that. There were 362 people with 200 stars by April 2019: https://twitter.com/ericwastl/status/1116561274379259904 )

As of recently only 283 have all 250 stars:-

https://twitter.com/ericwastl/status/1213134461229031424
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #826 on: 31 March, 2020, 10:57:44 am »
Well I made a start at AoC 2019 in January to learn some new skills for work and to occupy slow spots at work. Got halfway through Day 3 and stalled somewhat - mostly due to work getting busy.

Well given the current lockdown and the fact I can't do much of my job from home I started again from scratch. I'm up to Day 5 now and plodding away. I don't really know how to program so it's a lot of Googling and head scratching. I'm pretty sure in days 1 - 3 I made exactly the same mistakes as I managed the first time round  ::-)

I'm also fairly sure that some of what I'm doing is completely the opposite of best practise but there we go. Definitely doing something wrong as each run of my day 3 solution with the full input takes well over an hour to chug through.

Currently programming in C++ via Visual Studio Community 2019.
Miles cycled 2014 = 3551.5 (Target 7300 :()
Miles cycled 2013 = 6141.4
Miles cycled 2012 = 4038.1

Re: Advent of Code
« Reply #827 on: 31 March, 2020, 11:08:27 am »
Definitely doing something wrong as each run of my day 3 solution with the full input takes well over an hour to chug through.

If you can describe here in words how your algorithm works then someone here can give pointers...
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #828 on: 31 March, 2020, 11:10:30 am »
Cheers  :thumbsup:

I'll probably take you up on that at some point. Probably not today as I'm hip deep in day 5 and I think I'm getting somewhere with it. May as well keep on when I'm on a roll  ;D
Miles cycled 2014 = 3551.5 (Target 7300 :()
Miles cycled 2013 = 6141.4
Miles cycled 2012 = 4038.1

vorsprung

  • Opposites Attract
    • Audaxing
Re: Advent of Code
« Reply #829 on: 31 March, 2020, 11:52:57 am »
Definitely doing something wrong as each run of my day 3 solution with the full input takes well over an hour to chug through.

If you can describe here in words how your algorithm works then someone here can give pointers...

given that he is coding in C++ pointers are the problem

Davef

Re: Advent of Code
« Reply #830 on: 31 March, 2020, 01:40:33 pm »
If you get stuck I have all 49 solutions in  Microsoft c++ and can give some hints.

I also have some ludicrously large intcode programs.


Sent from my iPad using Tapatalk

Re: Advent of Code
« Reply #831 on: 12 November, 2020, 07:30:16 am »
Not long to go...I hope Eric has been busy.
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: Advent of Code
« Reply #832 on: 12 November, 2020, 01:30:36 pm »
could do with it this month really :)

Re: Advent of Code
« Reply #833 on: 30 November, 2020, 02:36:51 pm »
Tomorrow...
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #834 on: 01 December, 2020, 08:33:07 am »
Broken ?

"We'll be right back!"

Re: Advent of Code
« Reply #835 on: 01 December, 2020, 08:39:16 am »
I think the input generator is broken for some people.

Ah, he's posted over on reddit to say it was just his AWS instances running out of resources and shutting down. All due to the site being utterly swamped in the first few seconds after day 1 went live.

(I'm happy that happens at 5am UK time as I'm not interested in trying to get into the top 100.)

I got my input and was able to get both stars.
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #836 on: 01 December, 2020, 11:26:42 am »
Eric really has managed to set up the perfect conditions for an unintentional DDoS attack on his servers.

I thought that today's puzzle was a bit simple.
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

Re: Advent of Code
« Reply #837 on: 01 December, 2020, 11:54:02 am »
The first two or three days are usually very gentle.

There's still plenty of scope for different approaches to even this simple problem though, some more efficient than others.

(Mine runs nigh on instantaneously even when I tell it to look for more than 4 numbers that add to 2020 - there is a 4 number solution for my input - no solutions other numbers though.)
"Yes please" said Squirrel "biscuits are our favourite things."

Re: Advent of Code
« Reply #838 on: 01 December, 2020, 01:00:44 pm »
I did mine in Google Sheets with Vlookup. Managed to bodge it to find the four number solution too.

It runs with much fan noise and beachballing, like all great programs.

Ben T

Re: Advent of Code
« Reply #839 on: 01 December, 2020, 01:04:26 pm »
(click to show/hide)

Re: Advent of Code
« Reply #840 on: 01 December, 2020, 02:40:03 pm »
(click to show/hide)
"Yes please" said Squirrel "biscuits are our favourite things."

Davef

Re: Advent of Code
« Reply #841 on: 01 December, 2020, 02:56:00 pm »
I am redoing it in nostalgic intcode.

Davef

Re: Advent of Code
« Reply #842 on: 01 December, 2020, 03:33:54 pm »
http://cloud.tapatalk.com/s/5fc661d8a8566/day1.txt
If anyone wants to test their intcode computer from last year attached is this years day1 part 1 solution in intcode. It reads 200 lines from stdin and then produces the answer. It is large as it includes a pile of unneeded utility code.

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #843 on: 01 December, 2020, 05:02:31 pm »
Day 1 done. Maybe I'll quit while I'm ahead.

Re: Advent of Code
« Reply #844 on: 02 December, 2020, 08:15:52 am »
Once again it pays to read the problem description, including the bit highlighted in bold.
"Yes please" said Squirrel "biscuits are our favourite things."

Ben T

Re: Advent of Code
« Reply #845 on: 02 December, 2020, 10:29:33 am »
two lines of easily maintainable code  ;)
(click to show/hide)

Re: Advent of Code
« Reply #846 on: 02 December, 2020, 11:08:15 am »

Re: Advent of Code
« Reply #847 on: 02 December, 2020, 01:15:30 pm »
Bah humbug.  Day2 with VBA using an interface and injected code!!!!!


Clever enough to know I'm not clever enough.

Re: Advent of Code
« Reply #848 on: 02 December, 2020, 02:11:35 pm »
Some ugly / semi-minimalist perl:-

(click to show/hide)

(I know it can be code golfed to a lot less than that, but that's about as minimalist as I'd go before it starts to become a puzzle rather than recognisable code.)
"Yes please" said Squirrel "biscuits are our favourite things."

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Advent of Code
« Reply #849 on: 02 December, 2020, 06:08:22 pm »
Day 2 done  :thumbsup: I'm not brave enough to share my crappy JS coding though  :)