AtCoder Beginner Contest #127
問題文
省略
省略
C++に変換後のコードはこちら
int N, M, K;
{
int i;
mint a, b, res;
combination_mint comb;
rd(N,M,K);
comb.init(N*M+1);
a = b = 0;
rep(i,1,N) a += mint(i) * mint(N-i);
rep(i,1,M) b += mint(i) * mint(M-i);
res = (a * M * M + b * N * N) * comb.C(N*M-2, K-2);
wt(res);
}
Current time: 2024年04月26日10時15分41秒
Last modified: 2019年05月27日23時23分10秒 (by laycrs)
Tags: Competitive_Programming_Incomplete AtCoder AtCoder_Beginner_Contest ABC127 ABC_E
トップページに戻る
Logged in as: unknown user (not login)