Skip to content

Instantly share code, notes, and snippets.

@BenBurnett
BenBurnett / gdown.go
Last active January 17, 2022 13:31
goff download
package main
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
answers = [
"cigar", "rebut", "sissy", "humph", "awake", "blush", "focal", "evade",
"naval", "serve", "heath", "dwarf", "model", "karma", "stink", "grade",
"quiet", "bench", "abate", "feign", "major", "death", "fresh", "crust",
"stool", "colon", "abase", "marry", "react", "batty", "pride", "floss",
"helix", "croak", "staff", "paper", "unfed", "whelp", "trawl", "outdo",
"adobe", "crazy", "sower", "repay", "digit", "crate", "cluck", "spike",
"mimic", "pound", "maxim", "linen", "unmet", "flesh", "booby", "forth",
"first", "stand", "belly", "ivory", "seedy", "print", "yearn", "drain",
"bribe", "stout", "panel", "crass", "flume", "offal", "agree", "error",
@BenBurnett
BenBurnett / day17.py
Last active December 19, 2023 00:53
Day 17
from heapq import heappush, heappop
from dataclasses import dataclass
@dataclass
class Node:
x: int
y: int
score: int
direction: int
from collections import Counter
from enum import Enum
class HandType(Enum):
FIVE_OF_A_KIND = 7
FOUR_OF_A_KIND = 6
FULL_HOUSE = 5
THREE_OF_A_KIND = 4
TWO_PAIR = 3