Submission #518416

# Submission time Handle Problem Language Result Execution time Memory
518416 2022-01-23T18:46:16 Z blue Calvinball championship (CEOI15_teams) C++17
10 / 100
2 ms 788 KB
#include <iostream>
using namespace std;

using ll = long long;
const ll mod = 1'000'007LL;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin >> n;

    ll ch[101][101];
    for(int i = 0; i <= 100; i++)
    {
        ch[i][0] = ch[i][i] = 1;
        for(int j = 1; j < i; j++) ch[i][j] = (ch[i-1][j] + ch[i-1][j-1]) % mod;
    }

    ll dp[1+n];
    dp[0] = 1;
    for(int i = 1; i <= n; i++)
    {
        dp[i] = 0;
        for(int t = 1; t <= i; t++)
        {
            dp[i] = (dp[i] + ((dp[i-t] * ch[i-1][t-1]) % mod)) % mod;
        }
    }

    cout << dp[n] << '\n';
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 336 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 388 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 392 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 592 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 520 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 788 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 660 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 768 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -