Comments (2)
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.
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)
- Thanks! HOT 1
- ::std? HOT 1
- Can you help me understand? - day1 / part2 HOT 2
- Day 2: returning tuples HOT 2
- When to use vec! instead of Vec::new()? HOT 1
- Day 4 / Borrowing in loop HOT 8
- aoc10: 80x80 canvas? HOT 2
- Day 8: HashMap.copy is expensive HOT 4
- Walk through your thought process for day 10 HOT 3
- Day12: Slowlyness from usage of string? HOT 3
- Day 5: Comparing char and char::ToUppercase HOT 3
- Day 5: advancing or 'skipping' an iterator HOT 2
- Why read from stdin ? HOT 3
- AOC01: Using std::io::Result instead? HOT 3
- writeln!(io::stdout()) vs println HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advent-of-code.