![]() We can speed up the program even further by eliminating the first jump and adding some redundancy. To do this, we move a few of the instructions to the top, and then jump over them for the very first execution of the program, like so: So just like we did in Year 9, we can speed the program up by eliminating the jump between the OUTBOX instruction and the INBOX instruction. Otherwise, we ignore the unequal numbers and move on.Īs with Year 9, your first solution may meet the size challenge, but it may fall slightly short of the speed challenge. If the value is zero, we want to pick that number back up from the box and bring it to the OUTBOX. Solutions for the game Human Resource Machine by Tomorrow Corporation - HumanResourceMachine/13-EqualizationRoom. Legitimacy of Equalization Room (13) Speed Optimization Spoiler-y for room 13, but this won't be clear if you haven't played it anyway: After staring at the difference between my solution and the one posted here (1 faster, 27 commands instead of 28), and not seeing any fundamental difference, I wrote out the runtime on paper. Therefore, you can grab one number from the INBOX, store it somewhere, and then grab a second number and subtract it from the first. With this new ability, you can complete this assignment using only 3 total commands. You got a new command You can drag JUMP's arrow to different lines within your program. If we subtract two numbers, and the answer is zero, they must have been equal. Grab each thing from the INBOX, and drop each one into the OUTBOX. If they're equal, put one of them in the outbox. Year 13 - Equalization Room Objective: Get two things from the inbox. ![]() In this writing, we will present the best answers of the 13th year to you. In order to properly detect if two values are the same, there's a simple test we can perform. In the 'Human Resource Machine' game, the chapters gradually become harder. Programmers use comments to help themselves and other programmers quickly identify what a potentially confusing section of code is trying to do. They are simply a tool for you, as the author of a program, to help you keep portions of your program straight in your mind.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |