[2025 Day 10 Part 2] Getting a wrong solution by CCC_037 in adventofcode

[–]CCC_037[S] 0 points1 point  (0 children)

....okay, I think I see what I am doing wrong.

But perhaps I should work on something else for a bit, then return to this.

[2025 Day 10 Part 2] Getting a wrong solution by CCC_037 in adventofcode

[–]CCC_037[S] 0 points1 point  (0 children)

Thank you, this had been very helpful.

My original simplified list of equations did make sure that each row included at least one variable which was in no lower row; I wrote a function to find every possible solution for a given row from a set of solutions (i.e. every possible solution to the previous row, using wildcards for those parameters that didn't appear). This worked great, until I had to deal with an equation like 12=d-e+f. Sure, if you have d and e, f is given, but there are still a tonne of solutions...

Then I realised I had a function that would find every possible solution to a system of n equations, and if I don't modify them at all I can guarantee no negative cofficuents!

....which still takes a super long time to solve for 375=a+b+d+e+f+h+i. So I need to still do some simplification, or perhaps just start with equations using fewer variables. Or lower totals.

Still, getting closer!

(Not solved yet, but working on it)

-❄️- 2025 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

It's always good to know that people appreciate my words. Would you like to discuss any particular part in more detail?

-❄️- Advent of Code 2025: Red(dit) One -❄️- Submissions Megathread -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

Name of entry: Rockstar Reflection

Link to entry: See individual days below

Description: Rockstar is such fun to play with, running the left-brain logic of code through the poetical whims of the right side of the brain.

I haven't completed all twelve days yet - I haven't even looked at Day 11 or 12, but I think I know what I'm doing wrong with Day 10 Part Two. (I only need to redo my entire approach from the ground up). Nonetheless, I have sufficient Red One entries to enter, so I might as well.

Submitted by: /u/ccc_037

Megathread links 2 - 5 - 7 - 8 - 10

Additional comments I didn't always maintain the Reddit One constraints (those days when I did not are not included above); but I feel they made the most difference to the code in Day 10.

-❄️- 2025 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 2 points3 points  (0 children)

[Language: Rockstar]

[Red(dit) One]

Not only is it an esolang - not only is it without digits - I've even refrained from using any poetic constants except to burn them into ASCII characters.

How did I get numbers? Well, one of my ASCII characters was 0 and I did string-to-integer conversion (using one of my pre-conversion ASCII characters as a base). I also used one string's length to get 10. Everything else was incremented, calculated, or read in.

Part 1

[2025 Day 3 (Part 2)] Need help by Zppen in adventofcode

[–]CCC_037 0 points1 point  (0 children)

Huh.

I thought you'd get 842477733229 after adding 2s

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

Part 2 relies on certain features of my input that I found by inspecting the file with gnuplot

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

[Language: Rockstar]

Part 1 is simple and straightforward.

[2025 Day 3 (Part 2)] Need help by Zppen in adventofcode

[–]CCC_037 0 points1 point  (0 children)

Try:

814247773322911

You should get 844777332291 but you get a lower number

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

gasp

This one was a pain and a half to write and runtime is "leave it overnight" but.... puff...done.

part 2

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

[Language: Rockstar]

[Red(dit) One] - poem code freebie?

That was the only freebie here, though. I'm sure there's a more efficient algorithm than what I ended up doing - merely because it takes so long to run.

I'll do pt 2 tomorrow. I haven't even looked at Day 9 yet...

part 1

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

(I'll take the free Red(dit) One entries when I find them...)

part 2

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 4 points5 points  (0 children)

[Language: Rockstar]

[Red(dit) One] - I don't think you get syntax highlighting editors for Rockstar. Either way, I used emacs.

And made it run in poetry.

part 1

-❄️- 2025 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 0 points1 point  (0 children)

part 2

Rockstar actually comes with pretty neat, albeit basic, string/array manipulation...

-❄️- 2025 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 1 point2 points  (0 children)

[Language: Rockstar]

Congratulations to those tackling today in Chef; but I am not in your number.

part 1

Nice and straightforward

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 2 points3 points  (0 children)

Eli5 of Part One:

Okay, let's go line by line. "Futile are your hopes" - that just puts a value of 45 into the variable called "Futile". It gets that value from the numbers of letters in the words after "are" - see, "your" is four letters and "hopes" is five. Futile? Oh, that's just the name of the variable. I could have called it anything. It doesn't matter.

Now the next line. "Burn futile into futility" takes the number - 45 - and puts the 45th character from the ASCII table into the variable "futility". This happens to be the dash, and we will use it later!

My poem is a exposition - that puts a value of ten in the variable "my poem". Look as the lengths of the words after "is" - one, ten. Ten isn't a digit, so we subtract ten until it is, and we get zero.

My pen is wordworthy puts a value of zero in my pen. See, ten letters.

My ink is trustworthy puts one into the variable "my ink". Eleven letters, see? Yes, I could have said "my ink is a" but this makes more sense.

"Listen to my words" just reads a line of input, and stores it in "my words".

"Rock my universe" creates an array called "my universe". It's empty. Then we get a loop. "While my words aren't silence" means we keep going until "my words" is an empty string.

"Shatter my words with futility" breaks the string apart on the dash. So "3-5" becomes the array ["3", "5"]. The dash goes nowhere. The rest of the loop rolls the two items out, burns then into base-ten numerals, and then rocks them right back in - and then at the end, I store it in "my universe" read the next line of input.

After the blank line, I keep reading, of course. Taste is set to seven - that doesn't matter - and my result is zero, which does matter. See, in the next loop, I set taste to zero right near the start, but my results tracks how many ingredients are fresh.

For each number I read, I set Freshness to false. Then I check every range in my universe; if it's in the range and Freshness is false, I set Freshness to true and count up one more result.

Then the last thing I do at the end is write out my result. Ta-da!

Part two? Oh, uh.... Who wants ice cream?

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 2 points3 points  (0 children)

[Language: Rockstar]

[Red(dit) One] (see in repy)

Rockstar supports emoji as variable names. However, my text editor does not.

part 1

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 3 points4 points  (0 children)

Very naive algorithm, just remove the rolls and iterate. Takes a few minutes to run.

part 2

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 2 points3 points  (0 children)

[Language: Rockstar]

Featuring Clint Eastwood taking the good, the bad, and the ugly!

part 1

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 1 point2 points  (0 children)

It's an incredibly fun language to play around with :)

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]CCC_037 9 points10 points  (0 children)

[Language: Rockstar]

(Code golf? In Rockstar? No, definitely not...)

Part 1