This file contains 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
from typing import Dict, List, Mapping, Sequence, Set, Tuple | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil | |
input = ( | |
Input( | |
day = 16, | |
# sample = True, |
This file contains 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
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil | |
input = ( | |
Input( | |
day = 18, | |
# sample = True, |
This file contains 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
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple, Union | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil | |
input = ( | |
Input( | |
day = 19, | |
# sample = True, |
This file contains 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
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple, Union | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil | |
input = ( | |
Input( | |
day = 20, | |
# sample = True, |
This file contains 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
from __future__ import annotations | |
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple, Union | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil, floor | |
# input = ( | |
# Input( |
This file contains 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
from __future__ import annotations | |
from collections import defaultdict | |
from os import path | |
from typing import DefaultDict, List, NamedTuple, Optional, Sequence, Set, Tuple, cast | |
import requests | |
import re | |
from copy import copy | |
from pyrsistent import m, s, v, PMap, PSet, PVector |
This file contains 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
from __future__ import annotations | |
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple, Union | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil, floor | |
input = ( | |
Input( |
This file contains 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
from typing import Dict, List, Mapping, Optional, Sequence, Set, Tuple, Union | |
from advent import Input | |
import re | |
from collections import defaultdict | |
from math import ceil, floor | |
input = ( | |
Input( | |
day = 22, | |
# sample = True, |
This file contains 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
import { List, Map, Set } from "immutable"; | |
import { Input, print } from "advent"; | |
const input = (await Input.get({ day: 2 })).lineTokens(); | |
let x = 0; | |
let y = 0; | |
let aim = 0; | |
for (let [command, amountStr] of input) { |
This file contains 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
import { Map } from 'immutable'; | |
import { Advent, int } from "advent"; | |
const { compute, computeCheck } = await Advent({ day: 5 }); | |
compute(async (input) => { | |
const lines = input.lineTokens(undefined, / -> |,/); | |
let map = Map<number, Map<number, number>>(); | |
for (let line of lines) { |