제출 #442877

#제출 시각아이디문제언어결과실행 시간메모리
442877MahfuzAhmedZapina (COCI20_zapina)C++14
0 / 110
1 ms204 KiB
/** * 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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...