# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
20016 | xdoju | 카드 (kriii4_Z) | C++14 | 1000 ms | 71872 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
const int MOD = 1000000007;
int mul(int x, int y){ return (long long)x * y % MOD; }
int power(int x, int y){
if(y == 0) return 1;
int r = power(x, y / 2);
r = mul(r, r);
if(y % 2 == 1) r = mul(r, x);
return r;
}
int modinv(int x){ return power(x, MOD - 2); }
int dp[3010][3010];
int comb[3010][3010];
int D[3010];
int main(){
int N, L; scanf("%d%d", &N, &L);
for(int i = 1; i <= N; i++) scanf("%d", &D[i]);
comb[0][0] = 1;
for(int i = 1; i <= L; i++){
comb[i][0] = 1;
for(int j = 1; j <= i; j++){
comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % MOD;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |