pub struct Day06 { /* private fields */ }
Expand description
2015 Day 6: Light grid.
Reducing the 1000x1000 grid based on the unique x and y bounds in the input gives a ~4x speedup. For example, the 1000x1000 grid for this input:
turn on 0,0 through 999,999
toggle 0,0 through 999,0
turn off 499,499 through 500,500
Can be converted into this 3x4 grid:
| 0,0 through 498,0 | 499,0 through 500,0 | 501,0 through 999,0 |
| 0,1 through 498,498 | 499,1 through 500,498 | 501,1 through 999,498 |
| 0,499 through 498,500 | 499,499 through 500,500 | 501,499 through 999,500 |
| 0,501 through 498,999 | 499,501 through 500,999 | 501,501 through 999,999 |
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Day06
impl RefUnwindSafe for Day06
impl Send for Day06
impl Sync for Day06
impl Unpin for Day06
impl UnwindSafe for Day06
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)