Skip to content

Instantly share code, notes, and snippets.

@rep-movsd
Created December 2, 2025 04:34
Show Gist options
  • Select an option

  • Save rep-movsd/0c4fd104f3032f625c07adf9b2fc181f to your computer and use it in GitHub Desktop.

Select an option

Save rep-movsd/0c4fd104f3032f625c07adf9b2fc181f to your computer and use it in GitHub Desktop.
Advent Of Code 2025
// Exactly same code as day01_part1.cpp except this
auto rotator = [&state](int i) {
auto next = state + i % 100;
auto ret = ((state > 0 && next <= 0) || next >= 100) + abs(i) / 100;
state = (next + 100) % 100;
return ret;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment