mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Correct width calculation
The original worked by accident
This commit is contained in:
@@ -48,7 +48,11 @@ fn stripe(
|
|||||||
fn part_common(input: &mut dyn Read, diagonals: bool) -> String {
|
fn part_common(input: &mut dyn Read, diagonals: bool) -> String {
|
||||||
let lines = read_input(input, parse_input);
|
let lines = read_input(input, parse_input);
|
||||||
|
|
||||||
let width = lines.iter().map(|&((_, x_max), _)| x_max).max().unwrap() as usize + 1;
|
let width = lines
|
||||||
|
.iter()
|
||||||
|
.map(|&(_, (x, _))| x as usize + 1)
|
||||||
|
.max()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
let mut once_map = BitSet::new();
|
let mut once_map = BitSet::new();
|
||||||
let mut twice_map = BitSet::new();
|
let mut twice_map = BitSet::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user