Cycle optimized solution for Disk 1 Головоломка 7: The Dopplegänger for May 2023 leaderboard (50~69 cycles).
Solution for 60~69 cycles
The idea is to use more lines of code to reduce the processing time. For solutions with 70 cycles or greater, see previous guides.
Подсказки
- We need to store two input values in order to compare them. Solutions in other guides show how to pass a value between registers before storing the next input. That’s not the only way.
- There are more than one register.
- We still need some sort of loop, but a longer one that alternates between two registers.
Решение
петля: reg = input; check reg = int; jump if true: печать; int = input; check reg = int; jump if false: петля; печать: output = int; jump to: петля;
Обратите внимание, что Пар formatting may have inserted extra spaces. This should yield very close to 70 циклы. With a little bit of luck with different input data, or some other tricks (намекать:the first input), you can get under 70 cycles more often.
Hint for 50~59 cycles
You would still be trading smaller code size for faster execution speed, just taking that concept to the extreme, at least that’s how I understand it for now.
I used many lines of code.
It can be considered “hacky”.
Для головоломки #7 в частности, it’s accurate only probabilistically, but still at a very high rate that passes the game checks. The more lines of code, the less likely it is to make a mistake.
This and other ideas (from sections above) can be adapted to other puzzles as well.
Это все, чем мы делимся сегодня для этого. Комета 64 гид. Это руководство было первоначально создано и написано 4ut0m4t0n. На случай, если нам не удастся обновить это руководство, вы можете найти последнее обновление, следуя этому связь.