-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- 230220
list 뒤집기: [: : -1]
여러 인자 입력 받기 a, b = map(int, input().split())
greedy: +에서만 distance 계산
얕은 복사: [[]*n]
깊은 복사: [[] for_ in range(n)]
- 230221
조건을 통해 시간복잡도를 구해서 완탐인지 아닌지 파악(user 100, emoticon 7)
discount_list를 discount에 append할 때, list함수를 씌우거나 [:]를 해야 하는 이유:
- final안에 있는 모든 요소는 똑같은 리스트(result)를 참조해서 result의 값이 바뀌면 final의 요소들도 똑같이 바뀜
- 따라서 final.append(result[:]) 처럼 result값을 복사해서 final에 추가해야함
- list 시간복잡도: https://github.com/Algorithm-Study/Algorithm/issues/5
- 230222
조건을 통해 시간복잡도를 구해서 완탐인지 아닌지 파악(user 100, emoticon 7)
discount_list를 discount에 append할 때, list함수를 씌우거나 [:]를 해야 하는 이유:
- final안에 있는 모든 요소는 똑같은 리스트(result)를 참조해서 result의 값이 바뀌면 final의 요소들도 똑같이 바뀜
- 따라서 final.append(result[:]) 처럼 result값을 복사해서 final에 추가해야함
- list 시간복잡도: https://github.com/Algorithm-Study/Algorithm/issues/5