day 1 improvement

This commit is contained in:
Joshua Seigler 2021-12-12 19:17:19 -05:00
parent 5143f5c770
commit ce2635f5c0

View file

@ -1 +1 @@
d=$('pre').innerText.trim().split`\n`;t=(d,n)=>d.reduce((a,x,i)=>a+(+x>d[i-n]),0);[t(d,1),t(d,3)]
d=$('pre').innerText.trim().split`\n`;[1,3].map(n=>d.reduce((a,x,i)=>a+(+x>d[i-n]),0))