From 1ab8a785d5b9b0a1403e94e5e0f5f12f44aa48d5 Mon Sep 17 00:00:00 2001 From: setop Date: Thu, 8 Dec 2022 12:45:00 +0100 Subject: [PATCH] day 7, remove small cruft --- d07/part1.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d07/part1.awk b/d07/part1.awk index 57483cf..fe22b48 100644 --- a/d07/part1.awk +++ b/d07/part1.awk @@ -7,7 +7,7 @@ $2 == "cd" && $3 == ".." { S[depth]=0 depth -= 1 } -$2 == "cd" && $3 != ".." { depth += 1; P[depth]=$3; } +$2 == "cd" && $3 != ".." { depth ++ } NF == 2 { for (i=1;i<=depth;i++) { S[i]+=$1