Jump to content
pmcgee

The Advent of Code 2024.

Recommended Posts

56 minutes ago, JohnLM said:

But I did spot another error.  But is not a bug.  I miss-used the Random() function.

 

:classic_laugh: 

Share this post


Link to post
5 hours ago, JohnLM said:

What is part 2 that you are talking about?  Another puzzle?

There are two puzzles each day, the second is not revealed until you submit a correct answer for the first.

5 hours ago, JohnLM said:

I believe I have that part worked out.  This is not code, it is just my way for me to keep track of the logic for Inc/Dec directions, visually and mentally. 

{

 given the array for levels [1 3 2 4 5 ] 

1 and 3 = low to high is increase (RT) 
3 and 2 = high to low is decrease (LT) 

}

 

But there are twists as you said.

Yes, this works for these simple cases but what if the first number is higher than the second (making you think it's decreasing), but all the rest of the numbers after that are increasing? Well, it's an invalid row and you throw it out, right? What if there was a modification to that rule where in some cases you wouldn't throw that row out? It would change how you need determine increasing/decreasing.

Share this post


Link to post

I made a quick video of an (unsolved atm) part I liked of Q5-2 ...

 

 

  • Like 1

Share this post


Link to post

I was following an idea that I had thought of yesterday ... and now have the form of the solution.

I was assuming the data was less strictly complete than it is, so in reality it's not so hard actually.

 

 

Share this post


Link to post

Update. . .

 

I have finally completed the Day-02 puzzle.  I started on these puzzles a week later, so I am behind, not to mention, slow. 

 

Because I am a thorough type person, for me, the tricky parts were in determining what items were:  Increasing, Decreasing, Inc/Dec, or the Same (c for 'center'), and capturing the value amounts for the Inc/Dec etc., and then reporting those as detail in the final report. 


I just need to clean up the output view and make a few changes to the UI and Report view.  Hopefully, I will show the results later today. 
 

  • Like 1

Share this post


Link to post

I've been going slow, too (busy). I was stuck on Day 04 for quite awhile, thought I had it late last night and submitted an answer--but it was too low. :classic_sad:

 

I finally decided to look at some of the other answers on Reddit and found I had been making it way too hard on myself--nearly every other answer (no matter the language) approached it in a similar way and much simpler than my attempt. I haven't had time yet to redo my program (nor the heart to throw away all that work--even though it's wrong).

 

One thing I read on Reddit was a big note that reminded people that if you post your answer anywhere online, DO NOT post your input file! There are different input files for different users on Advent of Code and your input should not be shared with anyone else--solutions should work regardless of the input file and will have different answers. Also, don't post the puzzle text input (I need to go remove the texts from my repositories).

Share this post


Link to post

Sorry Cornelius, I don't understand you point on "input file".  what is it?  And for different users?  Anyway.  I was not sharing my source code, if that is what you mean.  Actually, I would be ashamed to show it.  Also, I see no reason why I can not show my output log or report or final outcome, not when the website already shows it in their instructions. 

 

>> Also, don't post the puzzle text input

I don't understand what you are saying. 

 

I'm getting ready to work on the Day-03 puzzle--I took a cellphone screenshot of the instructions and read it last night at work--It seems easy enough. Just some parsing of the string.  And I read (on reddit) that people were getting double-lines and were processing it wrong. And, no--I am not looking for answer on how to solve it or any other puzzle.  I would not read those if they are available, though those are in another language that I don't understand, nor how to read anyway. 

 

Also, question:  where are the second parts I keep reading about? 

I read bits here and there about part 1 and part 2.  But I don't see them in any of the days I have seen aready, 1-3. Or do you have to be at the website at a certain time to see it?  I don't know. 

Share this post


Link to post
Just now, JohnLM said:

I don't understand you point on "input file".  what is it?  And for different users?

Many people post their code solutions on Github to share and discuss with others; some include everything, even the input files and the instructions for the puzzle. This was a reminder on the Reddit site (where a lot of solutions are posted) not to include the instructions and input data. There are several different sets of input files and they generate different numbers; you're not supposed to share the input file generated for your unique login to AoC.

 

5 minutes ago, JohnLM said:

where are the second parts I keep reading about? 

I read bits here and there about part 1 and part 2.  But I don't see them in any of the days I have seen aready, 1-3. Or do you have to be at the website at a certain time to see it?

When you submit a correct answer to the first puzzle for a particular day, you get revealed a second puzzle for that day (there are only two per day). You don't see it until you correctly answer the first part--and the second one is always some twist to the first puzzle and uses the same input file. If you don't see any of them, then you haven't submitted any correct answers. You don't have to be at the website at a particular time but they aren't revealed ahead of the day for the puzzle.

  • Thanks 1

Share this post


Link to post

@corneliusdavid, ah, now I understand, since I am not a member of AoC, nor registered participant.  I am an outsider just playing along as best I can. 

 

Also, I found this website:  https://jeroenheijmans.github.io/advent-of-code-surveys/

I did not see any Delphi / Pascal language mentioned. Looks like there are very few people (including myself--day1 and 2 puzzles solved) in this language tackling AoC. 

  • Like 1
  • Thanks 1

Share this post


Link to post

Personally, I post everything that it takes to recreate my answer. And any sundry files (like Excel) I might employ to help along the way.

 

Reproducible Research™ 🙂

 

Quote

 I haven't had time yet to redo my program (nor the heart to throw away all that work--even though it's wrong).

Ha. I feel this pain. 😅
I have often found my code volume increasing like an expanding balloon ... until I have worked out what I should have been doing, then the cutting away begins ... and 80 lines drops back to 20.  I have this currently in my solution for Problem 5 Part 2.  60 out of 120 lines became unnecessary as I realised the information I needed to gather ... but the exploration process was necessary to come to that understanding in the first place. 🙂

  • Like 1

Share this post


Link to post

Looking at the stats in the Leaderboard for AoC 2024 Day 23 'LAN Party' -- does the time completion listed below mean he finished in 21 minutes ?

 

1) Dec 23 00:00:21 70233504?v=4ChristophGreger

 

Share this post


Link to post

I would rather say that are 21 seconds (which is probably less than I actually need to just read the description). This is backed by this quote from the About text:

Quote

Depending on the puzzle, that day's leaderboard usually fills up anywhere between two minutes and an hour.

 

Since the start time of each puzzle is  way out of my awake periods a day, I can thankfully ignore the ranking system completely. This allows me to concentrate on finding a suitable solution, sometimes even a clever one.

 

Share this post


Link to post

re:  Day-23 puzzle -- Note, I am not complaining but giving my observations thus far. 

 

I don't know.  I mean, it took me a moment to read through the instructions, about 1m:48s.  If I added that to my final time it took me to solve that puzzle, then it was 14 minutes to solve.  I was thinking 12 minutes and thought I could have made that Leaderboard--just joking. And that includes the building of the app, which I over-do too much in, everytime. Oh well.  I am usually pretty quick at thinking for a solution and then writing down (building) the code.  Well, there was a least two puzzles that I did solve.  And sometimes I will solve a puzzle during the coding part as I am building and working out the code, it may come to me.  But then I find issues or I don't quite like it, etc. etc.. 

 

I believe that the languages those people are using are a lot more sugar-coated in solving the puzzles in AoC2024.  Take for example, Day 23's puzzle.  I watched most of this YT video: "tWhwcORztSY" and saw how supper quick this person was at solving it, not to mention his detailed step-by-step description of how he was solving different parts and how fast he was writing out the code.  I mean, the guy sounded like he wrote the puzzle!  Now mind you, I was not trying to solve that puzzle.  Reading through that puzzle part-way was enough to tell me I would never solve it at the time I was reading it.  I still believe that today, even after watching a video of it.

 

If you look at the Leaderboard for Day 1's puzzle, you will see a time reading of "1) Dec 01  00:00:04 - qianxyz (AoC++)".  No way anyone could complete it after reading, writing and submitting in 4 seconds. That's got to be 4 minutes.

 

I believe that the time layout I showed in my last post for "00:00:21" is: Days/Hours/Minutes. 

 

As much as I could not solve most of these puzzles--and that's okay--I have enjoyed trying to solve them, to date.   I am still trying to solve some, while others are on the back-burner and I will eventually get back to those.  I have very much enjoyed this adventure. It gave me a chance to challenge myself and enjoy each day's puzzles.  I looked forward to each puzzle with antisipation every day, with only two days/puzzles left. 

 

Edited by JohnLM
typos

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×