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,'')) |
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
| let lineNumber = +readline() | |
| let input = []; | |
| while (lineNumber--) { | |
| input.push(readline()) | |
| } | |
| writeline(UltraCISC(input)) | |
| function UltraCISC(commands) { | |
| let result = new Array(32).fill("?"); |
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
| const programs = [ | |
| [ | |
| "20", | |
| "CLEAR 21", | |
| "OR 10 11", | |
| "CLEAR 27", | |
| "CLEAR 24", | |
| "AND 21 25", | |
| "OR 8 4", | |
| "SET 11", |