結果
問題 |
No.790 ちきんの括弧並べ
|
ユーザー |
|
提出日時 | 2019-02-19 21:18:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 696 bytes |
コンパイル時間 | 620 ms |
コンパイル使用メモリ | 80,308 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 20:16:02 |
合計ジャッジ時間 | 1,252 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <algorithm> #include <iostream> #include <map> #include <set> #include <bitset> #include <string> #include <vector> #include <queue> #include <functional> #include <math.h> #include <string.h> using std::endl; using std::string; #define ll long long int #define LEP(a, n) for(ll a = 0; a < n; ++a) #define INF 123456789012345 #define OUT std::cout #define IN std::cin #define itn int #define fro for #define sdt std ll N; ll factorial(ll start, ll end) { ll tmp = 1; for (ll a = start; a > end; --a) { tmp *= a; } return tmp; } int main() { IN >> N; OUT << factorial(2 * N, N + 1) / factorial(N, 0) << endl; return 0; }