# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
173250 | 2020-01-03T16:23:17 Z | Akashi | Asceticism (JOI18_asceticism) | C++14 | 84 ms | 56564 KB |
#include <bits/stdc++.h> using namespace std; const int MOD = 1e9 + 7; int n, k; int d[3005][3005]; int main() { scanf("%d%d", &n, &k); d[1][1] = 1; for(int i = 2; i <= n ; ++i) for(int j = 1; j <= i ; ++j) d[i][j] = (1LL * d[i - 1][j] * j + 1LL * d[i - 1][j - 1] * (i - j + 1)) % MOD; printf("%d", d[n][k]); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 380 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 0 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 380 KB | Output is correct |
7 | Correct | 2 ms | 376 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 3 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 380 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 0 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 380 KB | Output is correct |
7 | Correct | 2 ms | 376 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 3 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
11 | Correct | 2 ms | 760 KB | Output is correct |
12 | Correct | 3 ms | 1656 KB | Output is correct |
13 | Correct | 3 ms | 1656 KB | Output is correct |
14 | Correct | 3 ms | 1656 KB | Output is correct |
15 | Correct | 3 ms | 1656 KB | Output is correct |
16 | Correct | 3 ms | 1656 KB | Output is correct |
17 | Correct | 3 ms | 1272 KB | Output is correct |
18 | Correct | 3 ms | 1400 KB | Output is correct |
19 | Correct | 2 ms | 888 KB | Output is correct |
20 | Correct | 2 ms | 376 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 380 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 0 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 380 KB | Output is correct |
7 | Correct | 2 ms | 376 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 3 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
11 | Correct | 2 ms | 760 KB | Output is correct |
12 | Correct | 3 ms | 1656 KB | Output is correct |
13 | Correct | 3 ms | 1656 KB | Output is correct |
14 | Correct | 3 ms | 1656 KB | Output is correct |
15 | Correct | 3 ms | 1656 KB | Output is correct |
16 | Correct | 3 ms | 1656 KB | Output is correct |
17 | Correct | 3 ms | 1272 KB | Output is correct |
18 | Correct | 3 ms | 1400 KB | Output is correct |
19 | Correct | 2 ms | 888 KB | Output is correct |
20 | Correct | 2 ms | 376 KB | Output is correct |
21 | Correct | 8 ms | 6264 KB | Output is correct |
22 | Correct | 8 ms | 6264 KB | Output is correct |
23 | Correct | 8 ms | 6264 KB | Output is correct |
24 | Correct | 8 ms | 6264 KB | Output is correct |
25 | Correct | 8 ms | 6264 KB | Output is correct |
26 | Correct | 8 ms | 6264 KB | Output is correct |
27 | Correct | 8 ms | 6264 KB | Output is correct |
28 | Correct | 5 ms | 3448 KB | Output is correct |
29 | Correct | 3 ms | 1144 KB | Output is correct |
30 | Correct | 8 ms | 6264 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 380 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 376 KB | Output is correct |
5 | Correct | 0 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 380 KB | Output is correct |
7 | Correct | 2 ms | 376 KB | Output is correct |
8 | Correct | 2 ms | 376 KB | Output is correct |
9 | Correct | 3 ms | 376 KB | Output is correct |
10 | Correct | 2 ms | 376 KB | Output is correct |
11 | Correct | 2 ms | 760 KB | Output is correct |
12 | Correct | 3 ms | 1656 KB | Output is correct |
13 | Correct | 3 ms | 1656 KB | Output is correct |
14 | Correct | 3 ms | 1656 KB | Output is correct |
15 | Correct | 3 ms | 1656 KB | Output is correct |
16 | Correct | 3 ms | 1656 KB | Output is correct |
17 | Correct | 3 ms | 1272 KB | Output is correct |
18 | Correct | 3 ms | 1400 KB | Output is correct |
19 | Correct | 2 ms | 888 KB | Output is correct |
20 | Correct | 2 ms | 376 KB | Output is correct |
21 | Correct | 8 ms | 6264 KB | Output is correct |
22 | Correct | 8 ms | 6264 KB | Output is correct |
23 | Correct | 8 ms | 6264 KB | Output is correct |
24 | Correct | 8 ms | 6264 KB | Output is correct |
25 | Correct | 8 ms | 6264 KB | Output is correct |
26 | Correct | 8 ms | 6264 KB | Output is correct |
27 | Correct | 8 ms | 6264 KB | Output is correct |
28 | Correct | 5 ms | 3448 KB | Output is correct |
29 | Correct | 3 ms | 1144 KB | Output is correct |
30 | Correct | 8 ms | 6264 KB | Output is correct |
31 | Runtime error | 84 ms | 56564 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
32 | Halted | 0 ms | 0 KB | - |