본문 바로가기

[C++] Data Structure & Algorithm/DP(Dynamic Programming)6

[DP] Chapter 06. 실전 문제 : KART-RIDER (N모 회사) GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/07670c6d8432d4635fb4fb547d9c5e4ea9c021e1 실전 문제 : KART-RIDER (N모 회사) · developeSHG/Data_Structure-Algorithm@07670c6 developeSHG committed Aug 22, 2023 github.com #include #include #include #include #include using namespace std; #include #include // 오늘의 주제 : 동적 계획법 / (DP) // KART-RIDER // - 카트는 게임이 시작하면 달리기 시작하며, 주어진 시간(T)동안 달.. 2023. 8. 18.
[DP] Chapter 05. 실전 문제 : ENCHANT (K모 회사) GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/23423f2e32518517a1456e6600a483500ac09899 실전 문제 : ENCHANT (K모 회사) · developeSHG/Data_Structure-Algorithm@23423f2 developeSHG committed Aug 22, 2023 github.com #include #include #include #include #include using namespace std; #include #include // 오늘의 주제 : 동적 계획법 (DP) // ENCHANT // +0 집행검 // 무기 강화 주문서 => +1 / +2 / +3 중 하나 // +9.. 2023. 8. 18.
[DP] Chapter 04. 샘플 문제 : TIC-TAE-TOE GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/e90665bf5dc4e96eed19e507e91fbcfa80b14719 샘플 문제 : TIC-TAE-TOE · developeSHG/Data_Structure-Algorithm@e90665b developeSHG committed Aug 22, 2023 github.com 틱택토 게임 - https://www.google.com/search?q=%ED%8B%B1%ED%83%9D%ED%86%A0&oq=%ED%8B%B1%ED%83%9D%ED%86%A0&gs_lcrp=EgZjaHJvbWUqBggAEEUYOzIGCAAQRRg7MgYIARBFGDvSAQgxMDM0ajBqN6gCALAC.. 2023. 8. 18.
[DP] Chapter 03. 샘플 문제 : TRIANGLE_PATH GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/f3e8c575947be7453c8520077b7b38702a954ee0 TRIANGLE_PATH · developeSHG/Data_Structure-Algorithm@f3e8c57 developeSHG committed Aug 18, 2023 github.com TRIANGLE_PATH - (0,0)부터 시작해서 아래 or 아래우측으로 이동 가능 - 만나는 숫자를 모두 더함 - 더한 숫자가 최대가 되는 경로? 합? #include #include #include #include #include using namespace std; #include #include // 오늘의 .. 2023. 8. 18.
[DP] Chapter 02. 샘플 문제 : LIS (Longest Increasing Sequence) GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/cfc5d79d0dcc673ac44acfee9616c24a90c0715f LIS (Longest Increasing Sequence) · developeSHG/Data_Structure-Algorithm@cfc5d79 developeSHG committed Aug 18, 2023 github.com Seq : 1 9 2 5 7 부분 수열 : 일부(0개 이상) 숫자를 지우고 남은 수열 ex) 1 2 5 ex) 1 9 5 7 순 증가 부분 수열 ex) 1 2 5 LIS : 제일 긴 [순 증가 부분 수열]의 길이 1 2 5 7 = 길이 4 #include #include #inclu.. 2023. 8. 18.
[DP] Chapter 01. 동적 계획법 GitHub : https://github.com/developeSHG/Data_Structure-Algorithm/commit/fac912f7ab6a8e859eb14e7e89e9c0cff20caaf7 동적 계획법 입문 · developeSHG/Data_Structure-Algorithm@fac912f developeSHG committed Aug 18, 2023 github.com Dynamic Programming 문제를 쪼개서 해결하는데, 과정속에 반복되는 작업을 cache를 재사용해 불필요한 연산을 줄이는 것. 즉, DP는 기본적인 아이디어로 하나의 큰 문제를 여러 개의 작은 문제로 나누어서 그 결과를 저장하여 다시 큰 문제를 해결할 때 사용하는 것으로 특정한 알고리즘이 아닌 하나의 문제해결 패러.. 2023. 8. 17.