~cricket/advent2020

23e2bdee0942d7f9f7d8f3d1642953d9dab5984f — cricket 9 months ago ca35e68
fixe lol -> actually work
1 files changed, 3 insertions(+), 3 deletions(-)

M 2/main.zig
M 2/main.zig => 2/main.zig +3 -3
@@ 58,10 58,10 @@ fn part1(list: []Entry) !u16 {
fn part2(list: []Entry) !u16 {
    var j: u16 = 0;
    for (list) |entry| {
        if(entry.char == entry.value[entry.min] or entry.char == entry.value[entry.max]) {
            if(entry.value[entry.min] == entry.value[entry.max]) continue; // build with ReleaseFast or this will break
        if(entry.char == entry.value[entry.min-1] or entry.char == entry.value[entry.max-1]) {
            if(entry.value[entry.min-1] == entry.value[entry.max-1]) continue;
            j += 1;
        }
        j += 1;
    }
    return j;
}