Submission #442877

# Submission time Handle Problem Language Result Execution time Memory
442877 2021-07-09T10:13:45 Z MahfuzAhmed Zapina (COCI20_zapina) C++14
0 / 110
1 ms 204 KB
/**
 *  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 time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -