aoj-2335.cpp GitHub #include "../include/types/mod.cpp" using namespace std; using Mod = Modulo<1000000007, true>; int main() { int n, m, k; scanf("%d%d%d", &n, &m, &k); Mod res = 0; for (int i = 0; i <= k; i++) { int j = k - i; Mod y = Mod::comb(n + 2 * i, i) - Mod::comb(n + 2 * i, i - 1); Mod x = Mod::comb(m + 2 * j, j) - Mod::comb(m + 2 * j, j - 1); Mod c = Mod::comb(n + m + k * 2, n + i * 2); res = res + y * x * c; } cout << int(res) << endl; return 0; } Includes mod.cpp Back