結果
問題 |
No.1989 Pairing Multiset
|
ユーザー |
![]() |
提出日時 | 2025-10-09 23:01:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 329 ms / 2,000 ms |
コード長 | 752 bytes |
コンパイル時間 | 1,546 ms |
コンパイル使用メモリ | 161,636 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-10-09 23:01:29 |
合計ジャッジ時間 | 6,482 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> #define lint __int128 #define int long long #define Il inline #define fi first #define se second #define vec vector #define pb push_back #define IT ::iterator #define p_q priority_queue using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef double db; const int N=1e6,mod=998244353; const db eps=1e-9,pi=acos(-1.0); mt19937 rnd(time(0)); Il int rint(int l,int r){return rnd()%(r-l+1)+l;} Il int qpow(int x,int y){int t=1;for(;y;y>>=1,x=x*x%mod)if(y&1)t=t*x%mod;return t;} int n,m,ans; signed main(){ ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin>>n>>m;ans=n;for(int i=0;i<=(n<<1);i++)ans=ans*(m+i)%mod*qpow(i+1,mod-2)%mod; cout<<ans; return 0; }