Skip to content

Commit 21defdc

Browse files
committed
[Gold V] Title: 암호 만들기, Time: 8 ms, Memory: 69112 KB -BaekjoonHub
1 parent 37b21d7 commit 21defdc

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

백준/Gold/1759. 암호 만들기/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
### 성능 요약
66

7-
메모리: 69116 KB, 시간: 8 ms
7+
메모리: 69112 KB, 시간: 8 ms
88

99
### 분류
1010

1111
백트래킹, 브루트포스 알고리즘, 조합론, 수학
1212

1313
### 제출 일자
1414

15-
2025년 4월 4일 14:58:21
15+
2025년 4월 4일 14:59:51
1616

1717
### 문제 설명
1818

백준/Gold/1759. 암호 만들기/암호 만들기.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ let lc = readLine()!.split { $0 == " " }.map { Int(String($0))! },
44
l = lc[0],
55
c = lc[1]
66
let cList = readLine()!.split { $0 == " " }.map { String($0) }.sorted { $0 < $1 }
7-
var passwordSet = Set<String>()
7+
var passwordSet = [String]()
88

99
func makePassword(_ start: Int, _ count: Int, _ picked: String = "") {
1010
if count == 0 {
1111
let password = picked
1212
let isContainMoum = !moum.map { password.contains($0) }.filter { $0 == true }.isEmpty
1313
let isContainJaumMoreThanTwo = (jaum.map { password.contains($0) }.filter { $0 == true }.count) > 1
1414
if isContainMoum && isContainJaumMoreThanTwo {
15-
passwordSet.insert(password)
15+
passwordSet.append(password)
1616
}
1717
return
1818
}
@@ -21,5 +21,5 @@ func makePassword(_ start: Int, _ count: Int, _ picked: String = "") {
2121
}
2222
}
2323
makePassword(0, l)
24-
let answer = passwordSet.sorted { $0 < $1 }.joined(separator: "\n")
24+
let answer = passwordSet.joined(separator: "\n")
2525
print(answer)

0 commit comments

Comments
 (0)