pub struct ProconReader { reader: R, } impl ProconReader { pub fn new(reader: R) -> Self { Self { reader } } pub fn get(&mut self) -> T { use std::io::Read; let buf = self .reader .by_ref() .bytes() .map(|b| b.unwrap()) .skip_while(|&byte| byte == b' ' || byte == b'\n' || byte == b'\r') .take_while(|&byte| byte != b' ' && byte != b'\n' && byte != b'\r') .collect::>(); std::str::from_utf8(&buf) .unwrap() .parse() .ok() .expect("Parse Error.") } } macro_rules! chmax { ($a:expr, $b:expr) => { $a = std::cmp::max($a, $b) }; } fn main() { let stdin = std::io::stdin(); let mut rd = ProconReader::new(stdin.lock()); let n: usize = rd.get(); let m: i64 = rd.get(); let a: Vec = (0..n).map(|_| rd.get()).collect(); let sum = a.iter().sum::() - m * n as i64; let inf = std::i64::MAX / 2; let mut dp = vec![-inf; 2]; dp[0] = 0; for x in a { let mut nxt = vec![-inf; 2]; if dp[1] != -inf { if x >= 2 { nxt[1] = dp[1] + 1 - m; } nxt[0] = dp[1]; } if dp[0] != inf { chmax!(nxt[1], dp[0] + x - m); if x >= 2 { chmax!(nxt[0], dp[0] + x - 1); } } dp = nxt; } let max = dp.iter().max().unwrap(); println!("{}", if max * 2 > sum { "First" } else { "Second" }); }