Skip to content

이영섭 문제 별 issue 정리 #13

Description

@0seob
  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions