Skip to content

Commit

Permalink
Update with latest changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Jul 7, 2023
1 parent b0f90b1 commit 00fba67
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions day12.c3
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import std::io;
import std::math;
import std::collections::list;

def MapList = List<String>;
def MapList = List(<String>);

struct Map
{
Expand Down Expand Up @@ -73,7 +73,7 @@ fn Map* load_heightmap()
{
@pool()
{
String line = f.getline().str();
String line = f.getline().as_str();
foreach (int i, &c : line)
{
if (*c == 'S')
Expand Down
6 changes: 3 additions & 3 deletions day13.c3
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ struct PacketPair
Packet* p2;
}

def PacketList = List<Packet*>;
def PacketList = List(<Packet*>);

def Packet = List<PacketElement*>;
def Packet = List(<PacketElement*>);

def PacketPairs = List<PacketPair>;
def PacketPairs = List(<PacketPair>);

struct PacketElement
{
Expand Down
2 changes: 1 addition & 1 deletion day15.c3
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import std::math;
import std::collections::list;
import std::collections::priorityqueue;

def CoordPairList = List<int[<2>][2]>;
def CoordPairList = List(<int[<2>][2]>);

fn int[<2>]! parse_coord(String s)
{
Expand Down
4 changes: 2 additions & 2 deletions day16.c3
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import std::math;
import std::collections::map;
import std::collections::list;

def ValveMap = HashMap<String, int>;
def IntPairList = List<int[<2>]>;
def ValveMap = HashMap(<String, int>);
def IntPairList = List(<int[<2>]>);
ValveMap v;

struct Valve
Expand Down
6 changes: 3 additions & 3 deletions day17.c3
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import std::math;
import std::collections::map;
import std::collections::list;

def StateCacheMap = HashMap<StateCache, int>;
def StateCacheMap = HashMap(<StateCache, int>);

struct StateCache
{
Expand Down Expand Up @@ -273,6 +273,6 @@ fn void main()
{
DString s = load_jets();
defer s.free();
solve(s.str(), 2022);
solve(s.str(), 1000000000000i64);
solve(s.as_str(), 2022);
solve(s.as_str(), 1000000000000i64);
}
2 changes: 1 addition & 1 deletion day19.c3
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import std::math;
import std::collections::map;
import std::collections::list;

def BlueprintList = List<Blueprint>;
def BlueprintList = List(<Blueprint>);

const usz ORE = 0;
const usz CLAY = 1;
Expand Down
2 changes: 1 addition & 1 deletion day20.c3
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import std::math;
import std::collections::map;
import std::collections::list;

def LongList = List<long>;
def LongList = List(<long>);

fn void load_crypto(LongList* list, LongList* pos, long key)
{
Expand Down
4 changes: 2 additions & 2 deletions day21.c3
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import std::math;
import std::collections::map;
import std::collections::list;

def MonkeyList = List<Monkey>;
def NameMap = HashMap<String, MonkeyId>;
def MonkeyList = List(<Monkey>);
def NameMap = HashMap(<String, MonkeyId>);

enum Action
{
Expand Down
2 changes: 1 addition & 1 deletion day23.c3
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import std::io;
import std::math;
import std::collections::list;

def CharsArray = List<String>;
def CharsArray = List(<String>);

// Pick a padding that doesn't hit the asserts.
const int PADDING = 100;
Expand Down
2 changes: 1 addition & 1 deletion day24.c3
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import std::io;
import std::math;
import std::collections::list;

def CharsArray = List<String>;
def CharsArray = List(<String>);

const int PADDING = 100;

Expand Down
2 changes: 1 addition & 1 deletion day3.c3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module day3;
import std::io;
import std::collections::map;

def CharSet = HashMap<char, char>;
def CharSet = HashMap(<char, char>);

fn int evaluate(char c)
{
Expand Down
2 changes: 1 addition & 1 deletion day5.c3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module day5;
import std::io;
import std::collections::list;

def CharList = list::List<char>;
def CharList = list::List(<char>);

const MAX_PILES = 20;

Expand Down
2 changes: 1 addition & 1 deletion day7.c3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module day7;
import std::collections::list;
import std::io;

def DirList = List<Directory*>;
def DirList = List(<Directory*>);

struct Directory
{
Expand Down
2 changes: 1 addition & 1 deletion day8.c3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module day8;
import std::collections::list;
import std::io;

def Forest = distinct List<String>;
def Forest = distinct inline List(<String>);
fn Forest* parse_forest()
{
File f = file::open("forest.txt", "rb")!!;
Expand Down

0 comments on commit 00fba67

Please sign in to comment.