結果
| 問題 | No.790 ちきんの括弧並べ |
| ユーザー |
|
| 提出日時 | 2021-08-31 13:39:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 631 bytes |
| コンパイル時間 | 1,299 ms |
| コンパイル使用メモリ | 166,940 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 08:30:37 |
| 合計ジャッジ時間 | 1,962 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(A) A.begin(),A.end()
using vll = vector<ll>;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
using Graph = vector<vector<ll>>;
ll mod = 1e9 + 7;
ll inv(ll N) {
ll a = N, b = mod, c = 1, d = 0;
while (b > 0) {
ll t = a / b;
a -= t * b;
swap(a, b);
c -= t * d;
swap(c, d);
}
c %= mod;
if (c < 0)c += mod;
return c;
}
int main() {
ll N;
cin>>N;
ll AN=1;
rep(i,N-1){
AN*=(2*N-i);
}
rep(i,N){
AN/=(i+1);
}
cout<<AN<<endl;
}