1impl Solution {2pub fn strong_password_checker_ii(password: String) -> bool {3if password.len() < 8 {4return false;5}67let mut res = 0;8let mut prev_char = ' ';9for c in password.chars() {10match c == prev_char {11true => return false,12_ if c.is_ascii_lowercase() => res |= 0b1,13_ if c.is_ascii_uppercase() => res |= 0b10,14_ if c.is_ascii_digit() => res |= 0b100,15_ => res |= 0b1000, // "!@#$%^&*()-+"16}17prev_char = c;18}19res == 0b111120}21}