We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33e4fa2 commit c77386cCopy full SHA for c77386c
2 files changed
백준/Gold/2758. 로또/README.md
@@ -4,15 +4,15 @@
4
5
### 성능 요약
6
7
-메모리: 69240 KB, 시간: 312 ms
+메모리: 69240 KB, 시간: 276 ms
8
9
### 분류
10
11
다이나믹 프로그래밍
12
13
### 제출 일자
14
15
-2025년 8월 4일 00:33:24
+2025년 8월 4일 00:36:01
16
17
### 문제 설명
18
백준/Gold/2758. 로또/로또.swift
@@ -4,11 +4,11 @@ var output = ""
var dp = [[Int]](repeating: [Int](repeating: 0, count: 2001), count: 11)
-dp[0][0] = 1
+(1...2000).forEach { j in dp[1][j] = 1 }
-for i in 1...10 {
+for i in 2...10 {
for j in 1...2000 {
- for l in stride(from: 0, through: j/2, by: 1) {
+ for l in stride(from: 1, through: j/2, by: 1) {
dp[i][j] += dp[i-1][l]
}
0 commit comments