# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
411173 | 2021-05-24T13:19:46 Z | 송준혁(#7506) | Asceticism (JOI18_asceticism) | C++17 | 103 ms | 95808 KB |
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define lb lower_bound #define MOD 1000000007 #define INF (1ll<<62) using namespace std; typedef long long LL; typedef pair<int,int> pii; int N, K; LL D[3030][3030]; 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] = ((i-j+1)*D[i-1][j-1] + j*D[i-1][j])%MOD; } printf("%lld\n", D[N][K]); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 332 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Correct | 1 ms | 332 KB | Output is correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 1 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 332 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 332 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 332 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Correct | 1 ms | 332 KB | Output is correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 1 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 332 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 332 KB | Output is correct |
11 | Correct | 1 ms | 716 KB | Output is correct |
12 | Correct | 2 ms | 1740 KB | Output is correct |
13 | Correct | 2 ms | 1740 KB | Output is correct |
14 | Correct | 2 ms | 1740 KB | Output is correct |
15 | Correct | 2 ms | 1740 KB | Output is correct |
16 | Correct | 2 ms | 1740 KB | Output is correct |
17 | Correct | 1 ms | 1228 KB | Output is correct |
18 | Correct | 1 ms | 1484 KB | Output is correct |
19 | Correct | 1 ms | 844 KB | Output is correct |
20 | Correct | 1 ms | 332 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 332 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Correct | 1 ms | 332 KB | Output is correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 1 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 332 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 332 KB | Output is correct |
11 | Correct | 1 ms | 716 KB | Output is correct |
12 | Correct | 2 ms | 1740 KB | Output is correct |
13 | Correct | 2 ms | 1740 KB | Output is correct |
14 | Correct | 2 ms | 1740 KB | Output is correct |
15 | Correct | 2 ms | 1740 KB | Output is correct |
16 | Correct | 2 ms | 1740 KB | Output is correct |
17 | Correct | 1 ms | 1228 KB | Output is correct |
18 | Correct | 1 ms | 1484 KB | Output is correct |
19 | Correct | 1 ms | 844 KB | Output is correct |
20 | Correct | 1 ms | 332 KB | Output is correct |
21 | Correct | 6 ms | 8140 KB | Output is correct |
22 | Correct | 6 ms | 8140 KB | Output is correct |
23 | Correct | 5 ms | 8140 KB | Output is correct |
24 | Correct | 6 ms | 8140 KB | Output is correct |
25 | Correct | 5 ms | 8140 KB | Output is correct |
26 | Correct | 6 ms | 8140 KB | Output is correct |
27 | Correct | 5 ms | 8140 KB | Output is correct |
28 | Correct | 3 ms | 4044 KB | Output is correct |
29 | Correct | 1 ms | 1228 KB | Output is correct |
30 | Correct | 5 ms | 8140 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 332 KB | Output is correct |
3 | Correct | 1 ms | 332 KB | Output is correct |
4 | Correct | 1 ms | 332 KB | Output is correct |
5 | Correct | 1 ms | 332 KB | Output is correct |
6 | Correct | 1 ms | 332 KB | Output is correct |
7 | Correct | 1 ms | 332 KB | Output is correct |
8 | Correct | 1 ms | 204 KB | Output is correct |
9 | Correct | 1 ms | 204 KB | Output is correct |
10 | Correct | 1 ms | 332 KB | Output is correct |
11 | Correct | 1 ms | 716 KB | Output is correct |
12 | Correct | 2 ms | 1740 KB | Output is correct |
13 | Correct | 2 ms | 1740 KB | Output is correct |
14 | Correct | 2 ms | 1740 KB | Output is correct |
15 | Correct | 2 ms | 1740 KB | Output is correct |
16 | Correct | 2 ms | 1740 KB | Output is correct |
17 | Correct | 1 ms | 1228 KB | Output is correct |
18 | Correct | 1 ms | 1484 KB | Output is correct |
19 | Correct | 1 ms | 844 KB | Output is correct |
20 | Correct | 1 ms | 332 KB | Output is correct |
21 | Correct | 6 ms | 8140 KB | Output is correct |
22 | Correct | 6 ms | 8140 KB | Output is correct |
23 | Correct | 5 ms | 8140 KB | Output is correct |
24 | Correct | 6 ms | 8140 KB | Output is correct |
25 | Correct | 5 ms | 8140 KB | Output is correct |
26 | Correct | 6 ms | 8140 KB | Output is correct |
27 | Correct | 5 ms | 8140 KB | Output is correct |
28 | Correct | 3 ms | 4044 KB | Output is correct |
29 | Correct | 1 ms | 1228 KB | Output is correct |
30 | Correct | 5 ms | 8140 KB | Output is correct |
31 | Runtime error | 103 ms | 95808 KB | Execution killed with signal 11 |
32 | Halted | 0 ms | 0 KB | - |