# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
48230 | 2018-05-11T01:34:13 Z | kawaiigrabrielneko | Asceticism (JOI18_asceticism) | C++14 | 105 ms | 93784 KB |
#include <cstdio> #include <algorithm> using namespace std; long long dp[3009][3009]; int main(){ int N, K; scanf("%d %d", &N, &K); dp[1][1] = 1; for (int n = 2; n <= N; n++){ for (int k = 1; k <= n; k++){ dp[n][k] = (k*dp[n-1][k]+ (n-k+1)*dp[n-1][k-1])%1000000007L; } } printf("%d", dp[N][K]); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 496 KB | Output is correct |
3 | Correct | 2 ms | 496 KB | Output is correct |
4 | Correct | 2 ms | 496 KB | Output is correct |
5 | Correct | 2 ms | 496 KB | Output is correct |
6 | Correct | 2 ms | 496 KB | Output is correct |
7 | Correct | 2 ms | 496 KB | Output is correct |
8 | Correct | 2 ms | 556 KB | Output is correct |
9 | Correct | 2 ms | 556 KB | Output is correct |
10 | Correct | 2 ms | 684 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 496 KB | Output is correct |
3 | Correct | 2 ms | 496 KB | Output is correct |
4 | Correct | 2 ms | 496 KB | Output is correct |
5 | Correct | 2 ms | 496 KB | Output is correct |
6 | Correct | 2 ms | 496 KB | Output is correct |
7 | Correct | 2 ms | 496 KB | Output is correct |
8 | Correct | 2 ms | 556 KB | Output is correct |
9 | Correct | 2 ms | 556 KB | Output is correct |
10 | Correct | 2 ms | 684 KB | Output is correct |
11 | Correct | 2 ms | 948 KB | Output is correct |
12 | Correct | 3 ms | 2068 KB | Output is correct |
13 | Correct | 3 ms | 2108 KB | Output is correct |
14 | Correct | 3 ms | 2152 KB | Output is correct |
15 | Correct | 3 ms | 2212 KB | Output is correct |
16 | Correct | 3 ms | 2220 KB | Output is correct |
17 | Correct | 2 ms | 2220 KB | Output is correct |
18 | Correct | 2 ms | 2220 KB | Output is correct |
19 | Correct | 2 ms | 2220 KB | Output is correct |
20 | Correct | 2 ms | 2220 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 496 KB | Output is correct |
3 | Correct | 2 ms | 496 KB | Output is correct |
4 | Correct | 2 ms | 496 KB | Output is correct |
5 | Correct | 2 ms | 496 KB | Output is correct |
6 | Correct | 2 ms | 496 KB | Output is correct |
7 | Correct | 2 ms | 496 KB | Output is correct |
8 | Correct | 2 ms | 556 KB | Output is correct |
9 | Correct | 2 ms | 556 KB | Output is correct |
10 | Correct | 2 ms | 684 KB | Output is correct |
11 | Correct | 2 ms | 948 KB | Output is correct |
12 | Correct | 3 ms | 2068 KB | Output is correct |
13 | Correct | 3 ms | 2108 KB | Output is correct |
14 | Correct | 3 ms | 2152 KB | Output is correct |
15 | Correct | 3 ms | 2212 KB | Output is correct |
16 | Correct | 3 ms | 2220 KB | Output is correct |
17 | Correct | 2 ms | 2220 KB | Output is correct |
18 | Correct | 2 ms | 2220 KB | Output is correct |
19 | Correct | 2 ms | 2220 KB | Output is correct |
20 | Correct | 2 ms | 2220 KB | Output is correct |
21 | Correct | 8 ms | 8564 KB | Output is correct |
22 | Correct | 8 ms | 8696 KB | Output is correct |
23 | Correct | 8 ms | 8696 KB | Output is correct |
24 | Correct | 8 ms | 8696 KB | Output is correct |
25 | Correct | 8 ms | 8696 KB | Output is correct |
26 | Correct | 8 ms | 8696 KB | Output is correct |
27 | Correct | 8 ms | 8696 KB | Output is correct |
28 | Correct | 4 ms | 8696 KB | Output is correct |
29 | Correct | 2 ms | 8696 KB | Output is correct |
30 | Correct | 8 ms | 8696 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 496 KB | Output is correct |
3 | Correct | 2 ms | 496 KB | Output is correct |
4 | Correct | 2 ms | 496 KB | Output is correct |
5 | Correct | 2 ms | 496 KB | Output is correct |
6 | Correct | 2 ms | 496 KB | Output is correct |
7 | Correct | 2 ms | 496 KB | Output is correct |
8 | Correct | 2 ms | 556 KB | Output is correct |
9 | Correct | 2 ms | 556 KB | Output is correct |
10 | Correct | 2 ms | 684 KB | Output is correct |
11 | Correct | 2 ms | 948 KB | Output is correct |
12 | Correct | 3 ms | 2068 KB | Output is correct |
13 | Correct | 3 ms | 2108 KB | Output is correct |
14 | Correct | 3 ms | 2152 KB | Output is correct |
15 | Correct | 3 ms | 2212 KB | Output is correct |
16 | Correct | 3 ms | 2220 KB | Output is correct |
17 | Correct | 2 ms | 2220 KB | Output is correct |
18 | Correct | 2 ms | 2220 KB | Output is correct |
19 | Correct | 2 ms | 2220 KB | Output is correct |
20 | Correct | 2 ms | 2220 KB | Output is correct |
21 | Correct | 8 ms | 8564 KB | Output is correct |
22 | Correct | 8 ms | 8696 KB | Output is correct |
23 | Correct | 8 ms | 8696 KB | Output is correct |
24 | Correct | 8 ms | 8696 KB | Output is correct |
25 | Correct | 8 ms | 8696 KB | Output is correct |
26 | Correct | 8 ms | 8696 KB | Output is correct |
27 | Correct | 8 ms | 8696 KB | Output is correct |
28 | Correct | 4 ms | 8696 KB | Output is correct |
29 | Correct | 2 ms | 8696 KB | Output is correct |
30 | Correct | 8 ms | 8696 KB | Output is correct |
31 | Runtime error | 105 ms | 93784 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
32 | Halted | 0 ms | 0 KB | - |