Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
109761 | 黄一航 | 二叉树问题 | C++ | 解答错误 | 0 | 0 MS | 264 KB | 602 | 2023-11-11 10:35:43 |
#include <bits/stdc++.h> #define int __int128 using namespace std; int f[1005] = {1,1,2}; int n; int read() { int res = 0,f = 1; char c = getchar(); while (!isdigit(c)) { if (c == '-') f = -1; c = getchar(); } while (isdigit(c)) { res = (res << 1) + (res << 3) + (c ^ 48); c = getchar(); } return res * f; } void werite(int x) { if (x >= 10) werite(x / 10); putchar(x % 10 + '0'); } signed main() { n = read(); for (int i = 3; i <= n; i++) for (int j = 0; j < i; j++) f[i] += f[j] * f[i - 1 - j]; werite(f[n]); puts(""); return 0; }