Submission #98380

# Submission time Handle Problem Language Result Execution time Memory
98380 2019-02-22T19:25:45 Z someone_aa Calvinball championship (CEOI15_teams) C++17
10 / 100
104 ms 66560 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
using namespace std;
const int maxn = 10100;
const ll mod = 1000007;
ll dp[maxn][maxn];
ll n, arr[maxn];

int main() {
    cin>>n;
    for(int i=1;i<=n;i++) {
        cin>>arr[i];
    }

    dp[1][1] = 1LL;
    for(int i=2;i<=n;i++) {
        for(int j=1;j<=n;j++) {
            dp[i][j] = j * dp[i-1][j] + dp[i-1][j-1];
            dp[i][j] %= mod;
        }
    }

    ll result = 0LL;
    for(int i=1;i<=n;i++) {
        result += dp[n][i];
        result %= mod;
    }
    cout<<result<<"\n";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 868 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 4352 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 16 ms 12236 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 104 ms 66560 KB Execution killed with signal 9 (could be triggered by violating memory limits)
# Verdict Execution time Memory Grader output
1 Runtime error 64 ms 66560 KB Execution killed with signal 9 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 74 ms 66560 KB Execution killed with signal 9 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -