Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
37784 baka24 【S】T4 C++ 解答错误 0 387 MS 47132 KB 1486 2025-05-11 12:53:31

Tests(0/20):


#include <bits/stdc++.h> using namespace std; #define int long long #define lson t[pos].ls #define rson t[pos].rs #define pii pair<int,int> #define fr first #define sc second #define mk make_pair #define pb push_back #define popcnt __builtin_popcount #define inx(u) int I=h[(u)],v=edge[I].v,w=edge[I].w;I;I=edge[I].nx,v=edge[I].v,w=edge[I].w int read() { int x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar(); return x * f; } const int MAXN = 3000010, N = 3000000, M = 15, Mod = 998244353; int Pow(int x, int y) { int rt = 1; while (y) { if (y & 1) rt = rt * x % Mod; x = x * x % Mod, y >>= 1; } return rt; } int ans, a, b, c, jc[MAXN], ny[MAXN]; void slv() { a = read(), b = read(), c = read(); ans = 1; for (int i = 1; i <= a; i++) ans = ans * jc[a + b + c - i] % Mod * jc[a - i] % Mod * ny[a + b - i] % Mod * ny[a + c - i] % Mod; printf("%lld", ans); } signed main() { // freopen("1.in","r",stdin);freopen("1.out","w",stdout); jc[0] = ny[0] = 1; for (int i = 1; i <= N; i++) jc[i] = jc[i - 1] * i % Mod, ny[i] = Pow(jc[i], Mod - 2); // int _=read();while(_--) slv(); // cerr << clock() * 1.0 / CLOCKS_PER_SEC << "s\n"; return 0; }


测评信息: