結果
| 問題 |
No.1989 Pairing Multiset
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-10-08 09:49:06 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 22 ms / 2,000 ms |
| コード長 | 440 bytes |
| コンパイル時間 | 1,487 ms |
| コンパイル使用メモリ | 162,348 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-08 09:49:10 |
| 合計ジャッジ時間 | 2,865 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=1e6+10;
const int mod=998244353;
int n,m;
int Pow(int a,int b=mod-2){
int s=1;
while(b){
if(b&1)s=s*a%mod;
a=a*a%mod;b>>=1;
}return s;
}
signed main(){
ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
cin>>n>>m;
int A=1,B=1;
for(int i=m;i<=2*n+m;++i)A=A*i%mod;
for(int i=1;i<=2*n+1;++i)B=B*i%mod;
cout<<A*Pow(B)%mod*n%mod<<'\n';
return 0;
}//
vjudge1