| 比赛 |
寒假集训2 |
评测结果 |
WWEEE |
| 题目名称 |
UNO |
最终得分 |
0 |
| 用户昵称 |
ChenBp |
运行时间 |
0.510 s |
| 代码语言 |
C++ |
内存使用 |
11.14 MiB |
| 提交时间 |
2026-02-25 11:15:25 |
显示代码纯文本
#include <iostream>
#include <algorithm>
using namespace std;
const int mod=998244353,N=1e6+6;
typedef long long ll;
ll jc[N];
int a[3];
ll ksm(ll x,int y){
ll res=1;
while(y){
if(y&1) res=res*x%mod;
x=x*x%mod;
y>>=1;
}
return res;
}
ll c(ll x,ll y){
return jc[x]%mod*ksm((jc[y]*jc[x-y])%mod,mod-2)%mod;
}
int main(){
freopen("UNO.in","r",stdin);
freopen("UNO.out","w",stdout);
// cout<<ksm(8*24,1e3);
jc[0]=1;
for(int i=1;i<=N-3;i++){
jc[i]=(jc[i-1]*i)%mod;
}
// cout<<c(7,3);
// cout<<jc[3]<<" "<<jc[4]<<" "<<jc[7]<<" "<<ksm(6*24,mod-2);
for(int i=0;i<3;i++){
cin>>a[i];
}
sort(a,a+3);
cout<<c(a[0]+a[1],3);
return 0;
}