aoc2021
advent-of-code
aoc2021 | advent-of-code | |
---|---|---|
8 | 23 | |
4 | 20 | |
- | - | |
3.3 | 9.1 | |
5 months ago | 4 months ago | |
C++ | Rust | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
aoc2021
-
I'm learning c++ at work the last few months, and I'm considering asking to do AoC during work - what prep could I do for AoC in c++?
The fiddliest part is processing the input into usable form. I ended up with a template which used regex to convert a file of similar lines into a vector of tuples. It's not amazing code, I'm sure, but it did the job: https://github.com/UnicycleBloke/aoc2021/blob/master/utils/utils.h, used for example here in the run() function: https://github.com/UnicycleBloke/aoc2021/blob/master/day13/day13.cpp. Share and enjoy. ;)
-
[DAY 6] C# solution with commentary
I'm not certain, but this seems similar to my solution: https://github.com/UnicycleBloke/aoc2021/blob/master/day06/day06.cpp. I rotate an array of counts for days, and add the count for Day 8 to that for Day 6. Speed depends on the machine, but both parts run in about a millisecond on mine.
-
Anyone using c++'s standard libraries for AOC?
My code isn't amazing or anything, but it is here: https://github.com/UnicycleBloke/aoc2021
- -🎄- 2021 Day 14 Solutions -🎄-
-
-🎄- 2021 Day 5 Solutions -🎄-
C++: https://github.com/UnicycleBloke/aoc2021/blob/master/day05/day05.cpp
- -🎄- 2021 Day 4 Solutions -🎄-
-
-🎄- 2021 Day 3 Solutions -🎄-
C++ https://github.com/UnicycleBloke/aoc2021/blob/master/day03/day03.cpp. I suspect I'm overdoing the template-y goodness, but it's a learning exercise. Made such a meal of Part 2...
-
-🎄- 2021 Day 2 Solutions -🎄-
Nice. I figured we'll be parsing lines a lot so have written a function to parse the input into a vector of tuples: https://github.com/UnicycleBloke/aoc2021/blob/master/day02/day02.cpp.
advent-of-code
-
Day 18 (Advent of Code 2022), porting C++ solution to Rust, by fasterthanlime
I just did simple BFS on the lava cubes for part 1. For part 2, I just did a BFS on the bounding cube. Total runtime - 500 micro seconds for both parts on my 8 years old laptop: https://github.com/SvetlinZarev/advent-of-code/blob/main/2022/aoc-day-18/src/lib.rs
-
[2022 Day 16 (Part 1)][TypeScript] Can someone explain the general logic?
My solution is pretty simple - top down DP. On each step we can do only one of two things: * open a valve and stay in current position * do not open a vale, but move to a different positions
-
-🎄- 2022 Day 12 Solutions -🎄-
🦀🦀🦀 RUST 🦀🦀🦀
-
[2022 Day 4] Rust – Looking for advice on idiomatic parsing
You can see it in action here: https://github.com/SvetlinZarev/advent-of-code/blob/main/2022/aoc-day-04/src/lib.rs
-
-🎄- 2022 Day 1 Solutions -🎄-
Rust
-
[2021 day 6] What's you're fastest solution?
Here are the results of my benchmarks, which you can also run
-
Optimal algo for 2021 Day 19?
You can calculate the distances between the points found by each scanner. If two scanners report points with the same distance between them, then most probably they are adjacent. Runs in 4ms on my machine: https://github.com/SvetlinZarev/advent-of-code/tree/main/2021/aoc-day-19
-
go-faster/ch: fastest ClickHouse client, faster than Rust and C++
You can copy the release profile from here https://github.com/SvetlinZarev/advent-of-code/blob/main/2021/aoc-day-25/Cargo.toml#L8 and copy that directory to enable compilation for the machine's cpu https://github.com/SvetlinZarev/advent-of-code/tree/main/2021/aoc-day-25/.cargo
-
[2021][RUST] My solutions for AoC 2021 in Rust
I want to share my repo for whoever is interested. It contains Rust solutions for:
-
No clue how other people are hitting <200ms on Day 23 (C++)
Mine (rust)runs for 50ms for both parts. I've used just a regular bruteforce approach, so nothing fancy. There are several things I did that reduced the execution time:
What are some alternatives?
adventofcode - Advent of code solutions
opencv-playground
AdventOfCode2021.jl - Advent of Code 2021 in Julia
BenchmarkDotNet - Powerful .NET library for benchmarking
adventofcode - Solutions for problems from AdventOfCode.com
AdventOfCode - My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA
AoC - my personal repo for the advent of code yearly challenge
perlweeklychallenge-club - Knowledge base for The Weekly Challenge club members using Perl, Raku, Ada, APL, Awk, Bash, BASIC, Bc, Befunge-93, Bourne Shell, BQN, Brainfuck, C3, C, CESIL, C++, C#, Clojure, COBOL, Coconut, Crystal, D, Dart, Dc, Elm, Emacs Lisp, Erlang, Excel VBA, Fennel, Fish, Forth, Fortran, Gembase, GNAT, Go, Haskell, Haxe, HTML, Idris, IO, J, Janet, Java, JavaScript, Julia, Kotlin, Lisp, Lua, M4, Miranda, Modula 3, MMIX, Mumps, Myrddin, Nim, Nix, Node.js, Nuweb, OCaml, Odin, Ook, Pascal, PHP, Python, Postscript, Prolog, R, Ring, Ruby, Rust, Scala, Scheme, Sed, Smalltalk, SQL, Swift, Tcl, TypeScript, Visual BASIC, WebAssembly, Wolfram, XSLT and Zig.
advent-of-code
aoc_kotlin - Advent of code solutions in Kotlin
advent-of-code-2021
advent-of-code-2021 - AoC this year exclusively with Ruby