This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Copy Problem Data to Clipboard before you Run | |
data := StrSplit(trim(clipboard), "`r", "`n") | |
results := 0 | |
for each, line in data { | |
winningCard := {}, x := 0 | |
line := StrSplit(StrReplace(line, " ", " "), ": ").2 | |
cards := StrSplit(line, " | ") | |
for e, v in StrSplit(Trim(cards.1), " ") | |
winningCard[v] := 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--- Day 3: Toboggan Trajectory --- | |
With the toboggan login problems resolved, you set off toward the airport. While | |
travel by toboggan might be easy, it's certainly not safe: there's very minimal | |
steering and the area is covered in trees. You'll need to see which angles will | |
take you near the fewest trees. | |
Due to the local geology, trees in this area only grow on exact integer | |
coordinates in a grid. You make a map (your puzzle input) of the open squares | |
(.) and trees (#) you can see. For example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--- Part Two --- | |
While it appears you validated the passwords correctly, they don't seem to be | |
what the Official Toboggan Corporate Authentication System is expecting. | |
The shopkeeper suddenly realizes that he just accidentally explained the | |
password policy rules from his old job at the sled rental place down the street! | |
The Official Toboggan Corporate Policy actually works a little differently. | |
Each policy actually describes two positions in the password, where 1 means the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Advent of Code 2020 | |
After saving Christmas five years in a row, you've decided to take a vacation at | |
a nice resort on a tropical island. Surely, Christmas will go on without you. | |
The tropical island has its own currency and is entirely cash-only. The gold | |
coins used there have a little picture of a starfish; the locals just call them | |
stars. None of the currency exchanges seem to have heard of them, but somehow, | |
you'll need to find fifty of these coins by the time you arrive so you can pay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ____ ___ _ _ ___ | |
|___ \ / _ \ | || | ( _ ) | |
__) | | | | | | || |_ / _ \ | |
/ __/ | |_| | |__ _| | (_) | | |
|_____| \___/ |_| \___/ | |
Console Edition! | |
Coded by errorseven @ 5/28 | |
2048 is played on a gray 4×4 grid, with numbered tiles that slide smoothly when |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
_____ _ ____ __ | |
\_ \_ __ | |_ |___ \ /__\ ___ _ __ ___ __ _ _ __ | |
/ /\| '_ \| __| __) | / \/// _ \| '_ ` _ \ / _` | '_ \ | |
/\/ /_ | | | | |_ / __/ / _ | (_) | | | | | | (_| | | | | | |
\____/ |_| |_|\__| |_____| \/ \_/\___/|_| |_| |_|\__,_|_| |_| | |
Coded by errorseven @ 11-19-2018 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlackJack { | |
static _ := "".base.base := blackJack | |
__New(deckNumber, player) { | |
this.deck := this.BuildDeck(deckNumber) | |
this.cards := {"A": "Ace", "Q": "Queen", "K": "King" | |
, "J": "Jack", "T": 10} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
__ _ _ _ ___ _ _ _ | |
/__\_ _| |_ ___ _ __ __| | ___ __| | /___\ |__ (_) ___ ___| |_ ___ | |
/_\ \ \/ / __/ _ \ '_ \ / _` |/ _ \/ _` | // // '_ \| |/ _ \/ __| __/ __| | |
//__ > <| || __/ | | | (_| | __/ (_| | / \_//| |_) | | __/ (__| |_\__ \ | |
\__/ /_/\_\\__\___|_| |_|\__,_|\___|\__,_| \___/ |_.__// |\___|\___|\__|___/ | |
Coded by errorseven @ 5-14-17 |__/ v1.1.2 | |
Change Log: | |
----------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chalinput := | |
( | |
"I am elite. | |
Da pain! | |
Eye need help! | |
3Y3 (\)33d j00 t0 g37 d4 d0c70r. | |
1 n33d m4 p1llz!" | |
) | |
for e, line in StrSplit(Chalinput, "`n", "`r") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
_____ __ | |
/__ \__ _____ / _\_ _ _ __ ___ | |
/ /\/\ \ /\ / / _ \\ \| | | | '_ ` _ \ | |
/ / \ V V / (_) |\ \ |_| | | | | | | | |
\/ \_/\_/ \___/\__/\__,_|_| |_| |_| | |
Coded by errorseven @ 1/26/17 | |
The two sum problem is a common interview question, and it is a variation of the | |
subset sum problem. There is a popular dynamic programming solution for the |
NewerOlder