use proconio::marker::*; use proconio::*; use std::collections::*; type Map = BTreeMap; type Set = BTreeSet; type Deque = VecDeque; type Heap = BinaryHeap; const MOD: u64 = 998_244_353; fn main() { input! { n: usize, m: usize, } if n % 3 != 0 { println!("0"); return; } let mut ans = 0; // 正しい括弧列の中で、 `()` が `k` 個あるようなもの `f(k)` // `sum f(k) * 2.pow(n / 3 - k)` for k in 1..=n / 3 { // `f` をどうやって求めるのかわかりません。 } println!("{}", ans); } fn pow_mod(mut a: usize, mut n: usize, m: usize) -> usize { let mut res = 1; while n > 0 { if n & 1 == 1 { res *= a; res %= m; } a *= a; a %= m; n >>= 1; } res }