day 18 python fix a flood fill bug
not sure how this ever worked
This commit is contained in:
		
							parent
							
								
									4b5b25e56b
								
							
						
					
					
						commit
						772dda0bbc
					
				| @ -53,11 +53,10 @@ def flood(lava, border): | |||||||
|         x |= roll(a, 1, +1) |         x |= roll(a, 1, +1) | ||||||
|         x |= roll(a, 2, -1) |         x |= roll(a, 2, -1) | ||||||
|         x |= roll(a, 2, +1) |         x |= roll(a, 2, +1) | ||||||
|         x = x & ~border |         x &= ~lava | ||||||
|         x = x & ~lava |         b = a | x | ||||||
|         if (a == x).all(): |         if (a == b).all(): | ||||||
|             a |= border |  | ||||||
|             return a |             return a | ||||||
|         a = x |         a = b | ||||||
| 
 | 
 | ||||||
| solve() | solve() | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user