diff --git a/day19/ex2.bash b/day19/ex2.bash index cd2c992..99b30cd 100755 --- a/day19/ex2.bash +++ b/day19/ex2.bash @@ -69,20 +69,20 @@ done # hack: -# 1) build part 1 tree +# 1) build rules 42 and 31 # 2) calculate rule 8 and 11 with some "guessed" minimum possible value -# 3) rebuild tree from scratch, but with rules 8 and 11 pre-loaded -buildtree 1 var_0 0 +# 3) build rule 0 -# This value was found manually: stable from 5. +# result starts to be "stable" from this value SOME_LIMIT=5 + +buildtree 1 var_0 42 +buildtree 1 var_0 31 tmp8="(${MATCH[42]})+" tmp11="(${MATCH[42]}${MATCH[31]})" for ((i=2; i