fn main() { println!("Hello, world!"); } struct Solution; impl Solution { pub fn num_equiv_domino_pairs(dominoes: Vec>) -> i32 { let mut map = [0;100]; for d in dominoes { if let [i,j] = d[..] { map[(i.max(j) * 10 + i.min(j)) as usize] += 1; } } map.iter().filter(|&&x| x > 1).map(|&x| (x *(x-1))/2).sum::() } }