結果
問題 | No.790 ちきんの括弧並べ |
ユーザー |
![]() |
提出日時 | 2019-02-20 22:09:26 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 792 ms |
コンパイル使用メモリ | 73,068 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 19:04:49 |
合計ジャッジ時間 | 1,454 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <cstring> #include <cmath> using namespace std; using ll = long long; int main() { int n; cin >> n; int p[14]; p[0] = 1; for (int i = 1; i <= n; i++) { int t = 0; for (int j = 0; j < i; j++) { t += p[j] * p[i - 1 - j]; } p[i] = t; } cout << p[n] << endl; return 0; }