aboutsummaryrefslogtreecommitdiff
path: root/src/2022/day17/aoc.h
blob: c8abe3a1d0a2cebde1e13326fabac4931b012312 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "common.h"
#include <stdint.h>
#include <vector>

namespace aoc2022 {

/*
..####. 00011110 0x1E

...#... 00001000 0x08
..###.. 00011100 0x1C
...#... 00001000 0x08

....#.. 00000100 0x04
....#.. 00000100 0x04
..###.. 00011100 0x1C

..#.... 00010000 0x10
..#.... 00010000 0x10
..#.... 00010000 0x10
..#.... 00010000 0x10

..##... 00011000 0x18
..##... 00011000 0x18

####### 01111111 0x7F

....... 00000000 0x00
....... 00000000 0x00
....... 00000000 0x00
*/

enum rock_type {
  r1,
  r2,
  r3,
  r4,
  r5,
  chamber,
};

struct rock17 {
  rock_type type;
  std::vector<uint8_t> rs;
};

std::pair<size_t, size_t> day17(line_view);
} // namespace aoc2022