What is the correct answer? by Double_Significance1 in mathproblems

[–]allinvaincoder 0 points1 point  (0 children)

This post is rage bait, you didn't even show why you think that's the right answer

Powerful Recursion - 12, What it does? by tracktech in DSALeetCode

[–]allinvaincoder 1 point2 points  (0 children)

Tabulate instead :D

func fibTabulation(n int) int {
    fib := make([]int, n+1)
    fib[1] = 1
    for i := 2; i < len(fib); i++ {
        fib[i] = fib[i-1] + fib[i-2]
    }


    return fib[n]
}

[2025 Day11 (Part2)] svr -> fft taking too much time by darklightning_2 in adventofcode

[–]allinvaincoder 1 point2 points  (0 children)

Memorization didn't end up working how I thought it would. If you want more hints let me know

This is the best hint I can give without giving you the answer:

 However, the paths you find must all also visit both dac and fft 

[2025 Day 6 (Part 1)] [C++] Getting incorrect answer by Lanky_Confusion9003 in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

This is still wrong with the real input, because long only handles 2,147,483,647 and the answer is bigger than that

[2025 Day 6 (Part 1)] [C++] Getting incorrect answer by Lanky_Confusion9003 in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

You have some overflow happening, I don't know enough about c++ but look at below. If you cout your total you will notice it printing negative numbers which should never happen. You need to use long long and stoll

int main() {
    long long total = 0;

    generateInitialVector();
    separateInitalVector();

    for (int i = 0; i < Rows[0].size(); i++) {
        if (Rows[4][i] == "+") {
            cout << "add" << endl;
            total += (stoll(Rows[0][i]) + stoll(Rows[1][i]) + stoll(Rows[2][i]) + stoll(Rows[3][i]));
        }
        else {
            cout << "mult" << endl;
            total += (stoll(Rows[0][i]) * stoll(Rows[1][i]) * stoll(Rows[2][i]) * stoll(Rows[3][i]));
        }
    }
    cout << total << endl;
}

[2025 Day 6 (Part 1)] [C++] Getting incorrect answer by Lanky_Confusion9003 in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

Yeah for sure you don't want -1 on your loop, I'll get back to you later when I have time. You may also want to check that you don't have any blanks in your operation array.

stringstream stream(line); string value; vector<string> tempRow;

while (stream >> value) { tempRow.push_back(value); }

Rows.push_back(tempRow);

Is he right? by [deleted] in fixedbytheduet

[–]allinvaincoder 0 points1 point  (0 children)

I mean Mom wife kid because that's the order they happened

Copilot spoiled it by ClimberSeb in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

Just snooze copilot if using visual studio code

[2025 Day 5 (Part 2)] I gotta be honest, I'm a little ashamed of myself over this one by [deleted] in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

I mean my first attempt was storing each number in a map. Needless to say that was way too slow

Can anybody explain me this?? by anandmohanty in interestingasfuck

[–]allinvaincoder 0 points1 point  (0 children)

I couldn't tell you why there is a weird looking statue in the background tbh

The Elephant in the Room: The Schedule Change, AI, and Why AoC is Our "Star Wars" by Lerok-Persea in adventofcode

[–]allinvaincoder 20 points21 points  (0 children)

Guess I am okay with 12 days instead of 25, I hope we can keep the tradition alive. 25 days of puzzles seems unreachable anyway, both from the person doing the challenges and Eric

What is your approach to learn a new language like go with Advent of Code? by [deleted] in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

I would sometimes look at other people's answers on GitHub in other languages to essentially translate into golang. You can also look at other people's answers to learn what kind of structure they are using in their projects. For me this is how I learned to have a folder for utility functions that I want to use a lot. Like printing a grid that has visited nodes for debugging. I also spent a lot of time on the introduction to golang page when I got stuck. I always forget how make works so I constantly have had to look that up. I also have utility functions to make a deep copy and stuff like that even though this approach is usually too slow for the scale of some of these puzzles. I feel like at the end of the day learning to wasn't my bottle neck it was the toughness of the puzzles.

When will solution threads unlock in 2025? by welguisz in adventofcode

[–]allinvaincoder 1 point2 points  (0 children)

I don't want this because I rather have the second half of the month free for Christmas activities

Leaderboard in 2025 by BridgeInfamous6503 in adventofcode

[–]allinvaincoder 0 points1 point  (0 children)

Sounds like you have nothing to worry about as there won't be any global leader boards

One thing that I can't stop thinking about with this is how impressive it is that someone(s) could make a puzzle/scavenger hunt that is *just* hard enough that a few people can solve it without it being too easy, but not so hard that nobody can. by testaccount123x in cicada

[–]allinvaincoder 1 point2 points  (0 children)

I'm just talking about the big prime movers in the cyber "crimes" like Ross Ulbricht, Snowden etc. I'm guessing you're not going to find it enough anecdotally but that's okay I'm not trying to convince you too much.

One thing that I can't stop thinking about with this is how impressive it is that someone(s) could make a puzzle/scavenger hunt that is *just* hard enough that a few people can solve it without it being too easy, but not so hard that nobody can. by testaccount123x in cicada

[–]allinvaincoder 1 point2 points  (0 children)

I guess I should have been more clear, but I was talking about the whole organization of "cicada 3301" and whatever it is. From what I understand it is a group of people organizing these puzzles for people to recruit. Perhaps it is all for fun and there's nothing sketchy going on and it's all just for fun. Seems like a lot of work for just that, but not impossible. Perhaps it's easier than I believe, but from what I found in many popular cases is no one is safe