All Projects → badouralix → adventofcode-2018

badouralix / adventofcode-2018

Licence: MIT license
Advent of Code 2018

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
cython
566 projects
rust
11053 projects
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to adventofcode-2018

advent-of-code
My solutions for Advent of Code
Stars: ✭ 32 (+14.29%)
Mutual labels:  advent-of-code, advent-of-code-2018
AdventOfCode-Java
adventOfCode(Language.JAVA);
Stars: ✭ 15 (-46.43%)
Mutual labels:  advent-of-code, advent-of-code-2018
adventofcode
🎄 Advent of Code (2015-2021) in C#
Stars: ✭ 114 (+307.14%)
Mutual labels:  advent-of-code, advent-of-code-2018
adventofcode-solver
🎄 Advent of Code (2015-2021) in JavaScript
Stars: ✭ 16 (-42.86%)
Mutual labels:  advent-of-code, advent-of-code-2018
advent-of-code-2018
Learning rust from scratch
Stars: ✭ 19 (-32.14%)
Mutual labels:  advent-of-code, advent-of-code-2018
adventofcode
Advent of Code solutions 2015-2021
Stars: ✭ 95 (+239.29%)
Mutual labels:  advent-of-code, advent-of-code-2018
aoc2018
Advent of Code 2018 - my answers
Stars: ✭ 13 (-53.57%)
Mutual labels:  advent-of-code, advent-of-code-2018
advent-of-code
My Advent of Code Solutions - 350/350 Stars
Stars: ✭ 30 (+7.14%)
Mutual labels:  advent-of-code, advent-of-code-2018
coding challenge-24
Advent of Code 2019
Stars: ✭ 50 (+78.57%)
Mutual labels:  advent-of-code
AdventOfCode2020
Solving Advent of Code 2020, each day in a different language
Stars: ✭ 22 (-21.43%)
Mutual labels:  advent-of-code
AdventOfCode2021
Solutions to all 25 AoC 2021 problems in Rust 🦀 Less than 100 lines per day and under 1 second total execution time. With competitive global leaderboard placements! 🎄
Stars: ✭ 34 (+21.43%)
Mutual labels:  advent-of-code
advent-2017
Advent of Code 2017
Stars: ✭ 16 (-42.86%)
Mutual labels:  advent-of-code
adventofcode-21
AdventOfCode 2021 solutions from the Devcord server
Stars: ✭ 12 (-57.14%)
Mutual labels:  advent-of-code
advent-of-code
My solutions to Advent of Code in Clojure
Stars: ✭ 13 (-53.57%)
Mutual labels:  advent-of-code
AdventOfCode2021
My solutions to Advent of Code 2021
Stars: ✭ 15 (-46.43%)
Mutual labels:  advent-of-code
solutions
Solutions to online programming problems
Stars: ✭ 36 (+28.57%)
Mutual labels:  advent-of-code
advent-of-code-2021
🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2021
Stars: ✭ 173 (+517.86%)
Mutual labels:  advent-of-code
adventofcode-rb-2019
Solutions to http://adventofcode.com/2019 (complete)
Stars: ✭ 14 (-50%)
Mutual labels:  advent-of-code
advent-of-code-2020
🎅🌟❄️☃️🎄🎁
Stars: ✭ 98 (+250%)
Mutual labels:  advent-of-code
advent-of-cljc
Cross platform Clojure Advent of Code solutions
Stars: ✭ 44 (+57.14%)
Mutual labels:  advent-of-code

Advent of code 2018 solutions

⁣    🌟
    🎄
   🎄🎄
  🎄🎄🎄
🎄🎄🎄🎄
🎄🎄🎄🎄🎄
  🎁🎁🎁

These are proposed solutions for the Advent of Code 2018.

The solutions are automatically tested with travis.

Build Status

Usage

use ./aoc script

usage: aoc <command> [<args>]

aoc commands are:
   run      Runs submissions
   create   Creates a new submission
   config   Configures user's parameters

Examples

Run last problem

./aoc run
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running submissions for day 04:

* part 2:
---------------------------------------------------
Avg over all inputs
---------------------------------------------------
----------  ----------  -----------  ---
silvestre      78452        1.99 ms  py
degemer        43695        2.39 ms  py
jules          23037        2.49 ms  py
david          36371        2.94 ms  py
thomas          9763        2.97 ms  py
ayoub         136461        5.85 ms  cpp
evqna          49137        6.65 ms  cpp
badouralix     51232        7.26 ms  go
tpxp           41668      133.63 ms  rb
----------  ----------  -----------  ---

Run specific problems from specific users

./aoc run -d 1 -d 2 -p 1 -a ayoub -a david
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running submissions for day 01:

* part 1:
---------------------------------------------------
Avg over all inputs
---------------------------------------------------
-----  -------  -----------  ---
david    543        0.46 ms  py
ayoub    445        4.94 ms  cpp
-----  -------  -----------  ---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Running submissions for day 02:

* part 1:
---------------------------------------------------
Avg over all inputs
---------------------------------------------------
-----  --------  -----------  ---
david    5658        1.22 ms  py
ayoub    6448        4.84 ms  cpp
-----  --------  -----------  ---

You can use -r to run each submission on it's own input, or -e to print non-aggregated results.
see ./aoc run -h for full arguments description.

Contribute

For now we support c, c++, java, javascript, go, python 3 (+ cython), ruby, rust (stable) and bash scripts.

You can use ./aoc create tool to create a new empty submission:

usage: aoc create [-h] [-a AUTHOR] [-d DAY] [-p PART]
                  [-l {c,cpp,go,java,js,py,pyx,rb,rs,sh}]

Create a new submission

optional arguments:
  -a AUTHOR, --author AUTHOR
                        submission author
  -d DAY, --day DAY     problem day
  -p PART, --part PART  problem part
  -l {c,cpp,go,java,js,py,pyx,rb,rs,sh}, --language {c,cpp,go,java,js,py,pyx,rb,rs,sh}
                        submission language

you can also use ./aoc config to setup your local profile

usage: aoc config [-h] username {c,cpp,go,java,js,py,pyx,rb,rs,sh}

Configures user parameters

positional arguments:
  username              prefered username
  {c,cpp,go,java,js,py,pyx,rb,rs,sh}
                        prefered programming language

Using python

If you don't use create.py tool you should follow this convention:

day-[number]/part-[number]/[username].py    # your submission code
day-[number]/input/[username].txt           # your input file

Your submission code should inherit from the SubmissionPy class from runners.python module:

from tool.runners.python import SubmissionPy

class MyAwesomeSubmission(SubmissionPy):

    def run(self, s):
        # :param s: input in string format
        # :return: solution flag
        pass

You can add other functions & modules if you need to. Any external dependency should be added to requirements.txt.

Once you tested your solution you can submit it by making a PR.

History

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].