Skip to content

정솔리: 퇴사 #68

Merged
Hyyena merged 2 commits intoCoding-Test-Study-Group:mainfrom
jeongpine14:sollyj_퇴사
Mar 30, 2023

Hidden character warning

The head ref may contain hidden characters: "sollyj_\ud1f4\uc0ac"
Merged

정솔리: 퇴사 #68
Hyyena merged 2 commits intoCoding-Test-Study-Group:mainfrom
jeongpine14:sollyj_퇴사

Conversation

@jeongpine14
Copy link
Contributor

📖 풀이한 문제

  • 퇴사

💡 문제에서 사용된 알고리즘

  • 다이나믹 프로그래밍

📜 코드 설명

  1. 테이블 정의
    n일까지의 최대 수익이 들어갈 배열 정의
    profit_max[N + 1]

  2. 초기값 세팅
    T[]와 P[]에 입력에 주어진 상담 기간과 금액을 넣어준다.

  3. 점화식 세우기
    주석 참고

  • 예외 (예제 입력4 같은 경우)
    꼭 (i + T[i])일만 상담 할 수 있는 것은 아니고, 상담 다음날 상담을 할 수도 있는 것이다.
  1. 답 도출
    퇴사날 받을 수익: profit_max[N]

close #67


@jeongpine14 jeongpine14 added this to the 4주차 milestone Mar 29, 2023
@jeongpine14 jeongpine14 requested a review from a team as a code owner March 29, 2023 13:02
@jeongpine14 jeongpine14 self-assigned this Mar 29, 2023
@jeongpine14 jeongpine14 requested review from langoustinee and removed request for a team March 29, 2023 13:02
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solly`s 점화식이란...

Copy link
Member

@j2woo j2woo Mar 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solly's 예외 설명 아주 좋아요

@Hyyena Hyyena merged commit 1ff5887 into Coding-Test-Study-Group:main Mar 30, 2023
@jeongpine14 jeongpine14 deleted the sollyj_퇴사 branch May 17, 2023 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[정솔리] 퇴사

4 participants