use std::io::*; fn dfs(i: usize, m: i64, turn: usize, a: &mut [i64]) -> (i64, i64) { if i == a.len() { return (0, 0); } if a[i] == 1 { if turn == 0 { let mut res = dfs(i + 1, m, 1, a); res.0 += 1 - m; return res; } else { let mut res = dfs(i + 1, m, 0, a); res.1 += 1 - m; return res; } } else if a[i] == 2 || a[i] == 3 { if turn == 0 { // 次のターンにする let mut res1 = dfs(i + 1, m, 1, a); res1.0 += a[i] - m; let mut res2 = dfs(i + 1, m, 0, a); res2.0 += a[i] - 1; res2.1 += 1 - m; if res1.0 > res2.0 { return res1; } return res2; } else { let mut res1 = dfs(i + 1, m, 0, a); res1.1 += a[i] - m; let mut res2 = dfs(i + 1, m, 1, a); res2.1 += a[i] - 1; res2.0 += 1 - m; if res1.1 > res2.1 { return res1; } return res2; } } else { if turn == 0 { let mut res = dfs(i + 1, m, 0, a); res.0 += a[i] - 1; res.1 += 1 - m; return res; } else { let mut res = dfs(i + 1, m, 1, a); res.0 += 1 - m; res.1 += a[i] - 1; return res; } } } fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let n: usize = itr.next().unwrap().parse().unwrap(); let m: i64 = itr.next().unwrap().parse().unwrap(); let mut a: Vec = (0..n) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); // 1だったら強制分岐、2か3だったら選べる、それ以外は分岐しない let score = dfs(0, m, 0, &mut a); if score.0 > score.1 { println!("First"); } else { println!("Second"); } }