GithubHelp home page GithubHelp logo

Comments (2)

smarnach avatar smarnach commented on June 2, 2024 3

Oh, I did not realize the puzzle input is randomized, which is why assumed the answers were wrong. But you are right, for your input your code produces the correct solution. The puzzle input apparently never concatenates alternations in a way that it becomes relevant to process the whole product, and the resulting maze does not contain any cycles, so both of my points above are not relevant for the particular kind of input.

Anyway, thanks for publishing your code – I'm enjoying comparing it to my solutions. :)

from advent-of-code.

BurntSushi avatar BurntSushi commented on June 2, 2024

So how did you make it to the second part without solving the first one?

Because my program outputs the expected answer for my input? Did you try running the program?

$ cargo run --release < input/input.txt
largest number of doors: 4050
pass through at least 1000 doors: 8564

Screenshot of AoC answers: https://i.imgur.com/9SbM58M.png

But yes, the solution does look wrong. I would have assumed it to be correct too. :-)

from advent-of-code.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.