hingston/7-billion-humans-solutions

Data Backup Day current size solution is not 100% (FIX INSIDE)

Closed this issue · 1 comments

Edited version that doesn't work:

a:
mem2 = nearest datacube
drop
mem1 = nearest datacube
pickup mem2
if myitem > mem1:
	write mem1
endif
jump a

Now, a version that should work:


a:
mem2 = nearest datacube
drop
mem1 = set c
pickup mem2
if myitem > mem1:
	write mem1
endif
jump a

Ran about 10 tests on it with not a single red bar, so if it fails it's way over 99%

On the previous solution:
I ran the level 50 times and got 25 red bars in total, which means 98% success. Each time a run failed, the pair from the left column, row 1, 2 or 4 had equal numbers. Whether on the corresponding right pair the first number was smaller or the second one, doesn't seem to matter. If the conditions that I observed exactly cover all cases where it fails, the true success rate should be ~97%