use std::io::prelude::*;                                                                                                                                                                                                                     fn main() {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   let scan = std::io::stdin();                                                                                                                                                                                                                                                                                                                                                                                                                                                              let mut line = String::new();                                                                                                                                                                                                                let _ = scan.read_line(&mut line);                                                                                                                                                                                                           let v: Vec<&str> = line.split_whitespace().collect();                                                                                                                                                                                                                                                                                                                                                                                                                                     let n: usize = v[0].parse().unwrap_or(0);                                                                                                                                                                                                    let m: usize = v[1].parse().unwrap_or(0);                                                                                                                                                                                                                                                                                                                                                                                                                                                 let mut a = vec![vec![0i32; m+1]; n+1];                                                                                                                                                                                                      let mut b = vec![0i32; m+1];                                                                                                                                                                                                                                                                                                                                                                                                                                                              for (j,line) in scan.lock().lines().enumerate() {                                                                                                                                                                                                let uline = line.unwrap();                                                                                                                                                                                                                   let vec: Vec<&str> = uline.split_whitespace().collect();                                                                                                                                                                                     if j < n {                                                                                                                                                                                                                                       for i in 0..m {                                                                                                                                                                                                                                  a[j][i] = vec[i].parse().unwrap_or(0);                                                                                                                                                                                                   }                                                                                                                                                                                                                                        } else {                                                                                                                                                                                                                                         b[j-n] = vec[0].parse().unwrap_or(0);                                                                                                                                                                                                    }                                                                                                                                                                                                                                        }                                                                                                                                                                                                                                            for i in 0..n {                                                                                                                                                                                                                                  let mut sum:i32 = 0;                                                                                                                                                                                                                         for j in 0..m {                                                                                                                                                                                                                                  sum += a[i][j] * b[j];                                                                                                                                                                                                                   }                                                                                                                                                                                                                                            println!("{}", sum);                                                                                                                                                                                                                     }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     }


Measured memory_bytes: 5040