/**
* author: mahfuzz
* created: 09.07.2021
**/
#include <bits/stdc++.h>
using namespace std;
#define debug(x) cout << '>' << #x << ':' << x << endl;
#define all(p) p.begin(),p.end()
typedef long long ll;
const ll maxn = 355;
const ll mod = 1000000007;
ll dp[maxn][maxn];
int main(int argc, char* argv[]){
ios_base::sync_with_stdio(0);
cin.tie(nullptr);
ll n; cin >> n;
for(ll i = 1; i <= n; i++){
for(ll j = 1; j <= i; j++){
dp[i][j] = (dp[i - 1][i - j] + 1) % mod;
dp[i][j] = (dp[i][j] + dp[i][j - 1]) % mod;
}
}
cout << dp[n][n] << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |