Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
EFanZh committed Jul 21, 2024
1 parent 9cff4ca commit 1a0a0a9
Showing 1 changed file with 128 additions and 126 deletions.
254 changes: 128 additions & 126 deletions src/problem_1970_last_day_where_you_can_still_cross/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,133 @@ pub trait Solution {
mod tests {
use super::Solution;

const EXTRA_TEST_CASE: ((i32, i32, &[[i32; 2]]), i32) = (
(
13,
9,
&[
[12, 6],
[3, 4],
[2, 9],
[9, 4],
[9, 2],
[6, 4],
[4, 4],
[8, 6],
[4, 9],
[5, 6],
[7, 5],
[12, 4],
[11, 8],
[3, 7],
[2, 6],
[9, 8],
[3, 5],
[13, 4],
[1, 3],
[10, 2],
[8, 9],
[6, 6],
[11, 7],
[11, 1],
[13, 9],
[12, 7],
[10, 7],
[8, 2],
[1, 8],
[7, 3],
[6, 5],
[2, 1],
[10, 6],
[4, 8],
[4, 2],
[9, 7],
[6, 2],
[3, 6],
[12, 2],
[10, 3],
[10, 5],
[9, 5],
[8, 8],
[8, 7],
[3, 2],
[13, 6],
[3, 1],
[5, 1],
[2, 7],
[8, 3],
[12, 5],
[11, 2],
[6, 3],
[1, 4],
[13, 3],
[4, 1],
[9, 9],
[7, 7],
[4, 3],
[12, 1],
[2, 2],
[7, 6],
[4, 6],
[7, 9],
[7, 2],
[3, 8],
[1, 6],
[11, 3],
[11, 4],
[5, 9],
[13, 8],
[1, 9],
[10, 1],
[9, 1],
[6, 1],
[10, 9],
[12, 9],
[11, 5],
[8, 1],
[13, 5],
[9, 6],
[13, 2],
[6, 8],
[2, 8],
[5, 3],
[3, 3],
[13, 1],
[11, 9],
[9, 3],
[2, 4],
[5, 2],
[8, 5],
[13, 7],
[12, 8],
[5, 5],
[7, 1],
[7, 4],
[2, 5],
[6, 9],
[4, 7],
[5, 8],
[1, 5],
[10, 8],
[8, 4],
[1, 1],
[3, 9],
[1, 2],
[7, 8],
[1, 7],
[6, 7],
[11, 6],
[4, 5],
[5, 7],
[2, 3],
[10, 4],
[5, 4],
[12, 3],
],
),
35,
);

pub fn run<S: Solution>() {
let test_cases = [
((2, 2, &[[1, 1], [2, 1], [1, 2], [2, 2]] as &[_]), 2),
Expand All @@ -20,132 +147,7 @@ mod tests {
),
3,
),
(
(
13,
9,
&[
[12, 6],
[3, 4],
[2, 9],
[9, 4],
[9, 2],
[6, 4],
[4, 4],
[8, 6],
[4, 9],
[5, 6],
[7, 5],
[12, 4],
[11, 8],
[3, 7],
[2, 6],
[9, 8],
[3, 5],
[13, 4],
[1, 3],
[10, 2],
[8, 9],
[6, 6],
[11, 7],
[11, 1],
[13, 9],
[12, 7],
[10, 7],
[8, 2],
[1, 8],
[7, 3],
[6, 5],
[2, 1],
[10, 6],
[4, 8],
[4, 2],
[9, 7],
[6, 2],
[3, 6],
[12, 2],
[10, 3],
[10, 5],
[9, 5],
[8, 8],
[8, 7],
[3, 2],
[13, 6],
[3, 1],
[5, 1],
[2, 7],
[8, 3],
[12, 5],
[11, 2],
[6, 3],
[1, 4],
[13, 3],
[4, 1],
[9, 9],
[7, 7],
[4, 3],
[12, 1],
[2, 2],
[7, 6],
[4, 6],
[7, 9],
[7, 2],
[3, 8],
[1, 6],
[11, 3],
[11, 4],
[5, 9],
[13, 8],
[1, 9],
[10, 1],
[9, 1],
[6, 1],
[10, 9],
[12, 9],
[11, 5],
[8, 1],
[13, 5],
[9, 6],
[13, 2],
[6, 8],
[2, 8],
[5, 3],
[3, 3],
[13, 1],
[11, 9],
[9, 3],
[2, 4],
[5, 2],
[8, 5],
[13, 7],
[12, 8],
[5, 5],
[7, 1],
[7, 4],
[2, 5],
[6, 9],
[4, 7],
[5, 8],
[1, 5],
[10, 8],
[8, 4],
[1, 1],
[3, 9],
[1, 2],
[7, 8],
[1, 7],
[6, 7],
[11, 6],
[4, 5],
[5, 7],
[2, 3],
[10, 4],
[5, 4],
[12, 3],
],
),
35,
),
EXTRA_TEST_CASE,
];

for ((row, col, cells), expected) in test_cases {
Expand Down

0 comments on commit 1a0a0a9

Please sign in to comment.