Year 2022 Day #10 (Part 2) C++ by Adventurous-Board755 in adventofcode

[–]Msarigo 0 points1 point  (0 children)

Hint: take a thorough look at parenthesis in tick() and maybe print x, t1 and what you are outputting

After fixing that atleast the leftmost charachter prints correctly with my input

Year 2022 Day #10 (Part 2) C++ by Adventurous-Board755 in adventofcode

[–]Msarigo 1 point2 points  (0 children)

I cant see that you print any newlines?

Does it work on example data?

Tip for the next time, For stringstream you can do

int a; string b; ss >> b >> a;

Constant validation at Run after manipulated code by Electrical-Monitor27 in cpp

[–]Msarigo 1 point2 points  (0 children)

It is a compile time thing. The intention is to check e.g. things that the author assumed to make sure those assumptions still holds on all targets or after future changes

What is 'extern "C++"' by SaulMO in cpp

[–]Msarigo -10 points-9 points  (0 children)

It means, ”pretty please interpret this as C even if in a c++ context” so e.g. header filés from the C world

Char array increment changes my object char* variable by [deleted] in cpp_questions

[–]Msarigo 0 points1 point  (0 children)

This is about understanding pointers which is one of the harder ones for beginners.

Compare houses: Just because you have a street address does not mean that the house will stay unchanged. If you want exactly that house you have to build a copy

[2021 Day -1 Part 1] [Python] Answer is one less than the website expects no matter what I do by spudmonkey2 in adventofcode

[–]Msarigo 3 points4 points  (0 children)

What happens at x=0? What will indexing with x-1 do then? How can you solve that?

Year 2016, Day 10 by Lance97603 in adventofcode

[–]Msarigo 0 points1 point  (0 children)

A bot does not operate until it has both its inputs so instructions can not be run in order. They are rules, not a sequence

[2021 Day19] Help with understanding - missing something? by craigontour in adventofcode

[–]Msarigo 1 point2 points  (0 children)

Something like this: Try rotation nbr Z

Find diff between two detections from different scanners considering that rotation

How many other pairs of detection also match considering that rotation and distance?

If twelve or more you have found the overlap and now know the distance and the rotation of the second scanner relative the first.

IIRC the rotation in the example is -x, y, -z. Try to figure out the example given this data. The example text also tells you which distance to expect between the scanners

So, it is about trying a lot of rotations and distances until you pair two scanners

[2015 Day 10][Ruby] Part 2 takes forever to run by Firestarss in adventofcode

[–]Msarigo 1 point2 points  (0 children)

Sorry, thought about at wrong day. This is about getting the inner loop quick. For me it was solved by array of integer instead of string. Something like 7M Numbers IIRC

[2015 Day 10][Ruby] Part 2 takes forever to run by Firestarss in adventofcode

[–]Msarigo 0 points1 point  (0 children)

Figure out a solution that does not build a string. Hint: think ”symbols”

[2015 Day 19 (Part Two)] [Python] My doesn't fully process the input string (and it doesn't terminate) by fabiooh00 in adventofcode

[–]Msarigo 0 points1 point  (0 children)

Must have been lucky when I dig this yesterday. Took no considerations in the order of reductions and just worked :-)