aboutsummaryrefslogtreecommitdiff
path: root/src/2015/day12/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/2015/day12/README.md')
-rw-r--r--src/2015/day12/README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/2015/day12/README.md b/src/2015/day12/README.md
index 0784931..f242cd3 100644
--- a/src/2015/day12/README.md
+++ b/src/2015/day12/README.md
@@ -15,4 +15,13 @@ You will not encounter any strings containing numbers.
What is the sum of all numbers in the document?
+--- Part Two ---
+Uh oh - the Accounting-Elves have realized that they double-counted everything red.
+
+Ignore any object (and all of its children) which has any property with the value "red". Do this only for objects ({...}), not arrays ([...]).
+
+ [1,2,3] still has a sum of 6.
+ [1,{"c":"red","b":2},3] now has a sum of 4, because the middle object is ignored.
+ {"d":"red","e":[1,2,3,4],"f":5} now has a sum of 0, because the entire structure is ignored.
+ [1,"red",5] has a sum of 6, because "red" in an array has no effect.