procon_lib_rs

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub CoCo-Japan-pan/procon_lib_rs

:warning: verify/AtCoder/abc290f/src/main.rs

Depends on

Code

// https://atcoder.jp/contests/abc290/tasks/abc290_f

#![allow(non_snake_case)]
use binom::Binom;
use proconio::{fastout, input};
use static_modint::ModInt998244353;

const MAX_BINOM: usize = 2_000_010;

#[fastout]
fn main() {
    input! {
        T: usize,
    }
    let binom = Binom::<ModInt998244353>::new(MAX_BINOM);
    for _ in 0..T {
        input! {
            N: usize,
        }
        // 2N-2を1以上の整数N個の和に分解する
        // このとき最大の直径は、N+1-(1の数)
        // 1の数は2~N-1個
        let ans = binom.comb(2 * N - 3, N - 2) * (N + 1) - binom.comb(2 * N - 4, N - 2) * N;
        println!("{}", ans);
    }
}
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.13.9/x64/lib/python3.13/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
                   ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.13.9/x64/lib/python3.13/site-packages/onlinejudge_verify/languages/rust.py", line 288, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page