题意:https://mp.weixin.QQ.com/s/wJ5y0QTkqT1Uz_f6BkbJ0g
题解:http://mp.weixin.qq.com/s/nHw70ZSuh_FvWNRgOhH6Xw
#include <bits/stdc++.h>using namespace std;int main() { int dp[1001]; dp[2] = 1; for(int i = 3; i <= 1000; i++) { dp[i] = 0; for(int j = 2; j < i; j++) { dp[i] += dp[j] * dp[i - j + 1] % 100007; dp[i] %= 100007; } } int n; while(cin >> n) { cout << dp[n] << endl; } return 0;}
新闻热点
疑难解答