Skip to content

Commit 0f83492

Browse files
committed
Fix day08a
1 parent 99dda42 commit 0f83492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

day08a/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ pub fn main() {
1919
);
2020
seen.extend(
2121
(1..s - 1)
22-
.scan(g[s - 1][i], |max, y| match (*max, g[s - y][i]) {
22+
.scan(g[s - 1][i], |max, y| match (*max, g[s - y - 1][i]) {
2323
(m, n) if n > m => {
2424
*max = n;
25-
Some(Some(i + (s - y) * s))
25+
Some(Some(i + (s - y - 1) * s))
2626
}
2727
(m, _) if m >= b'9' => None,
2828
_ => Some(None),

0 commit comments

Comments
 (0)