Last active
June 12, 2019 09:50
-
-
Save engelsdamien/6fdd222a59b0bd1b90e78f5f3d708426 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(c=Array(32).fill(2);l=readline();c[e]={S:3,A:c[e]&c[g],O:c[e]|c[g]}[d]|0)[[d],e,g]=l.split` ` | |
writeline(c.reduce((p,f)=>'0.?1'[f]+p,'')) |
Nice one :D Down to 156 chars
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!
Wondering, if you take out the
,C:0
out of the object and place a fallback at the{}[d]
end to||0
, then either match with resulting 0 andC
will fallback to0
.