aboutsummaryrefslogtreecommitdiffstats
path: root/src/06/part2
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-04-08 12:40:30 -0400
committerLouis Burda <quent.burda@gmail.com>2023-04-09 10:21:36 -0400
commit9282e95e8844afe856ba76ceb6d2c3010df8bb1a (patch)
treee35affc89b20324371381e079f7cb5f8a06aa81b /src/06/part2
parent2b5d4232879dc74491dabf54a0ddc958d66ebcec (diff)
downloadaoc2020-zig-master.tar.gz
aoc2020-zig-master.zip
Restructure repo and update solutions to zig 0.10.1HEADmaster
Diffstat (limited to 'src/06/part2')
-rw-r--r--src/06/part235
1 files changed, 35 insertions, 0 deletions
diff --git a/src/06/part2 b/src/06/part2
new file mode 100644
index 0000000..73840f2
--- /dev/null
+++ b/src/06/part2
@@ -0,0 +1,35 @@
+--- Part Two ---
+
+As you finish the last group's customs declaration, you notice that you misread one word in the
+instructions:
+
+You don't need to identify the questions to which anyone answered "yes"; you need to
+identify the questions to which everyone answered "yes"!
+
+Using the same example as above:
+
+abc
+
+a b c
+
+ab ac
+
+a a a a
+
+b
+
+This list represents answers from five groups:
+
+- In the first group, everyone (all 1 person) answered "yes" to 3 questions: a, b, and
+c. - In the second group, there is no question to which everyone answered "yes". - In
+the third group, everyone answered yes to only 1 question, a. Since some people did not
+answer "yes" to b or c, they don't count. - In the fourth group, everyone answered yes to only
+1 question, a. - In the fifth group, everyone (all 1 person) answered "yes" to
+1 question, b.
+
+In this example, the sum of these counts is 3 + 0 + 1 + 1 + 1 = 6.
+
+For each group, count the number of questions to which everyone answered "yes".
+What is the sum of those counts?
+
+