Skip to content

Commit

Permalink
17차시 업로드
Browse files Browse the repository at this point in the history
  • Loading branch information
YIM2UL2ET committed Apr 15, 2024
1 parent 2146ac6 commit b2c85a2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions YIM2UL2ET/DP/17차시 - BOJ11726.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <iostream>
#include <vector>

std::vector <int> dp(1000);

int func(int n) {
if (dp[n-1] == 0) {
dp[n-1] = (func(n-1) + func(n-2)) % 10007;
}
return dp[n-1];
}

int main(void) {
dp[0] = 1, dp[1] = 2;

int n;
std::cin >> n;
std::cout << func(n);
return 0;
}
4 changes: 3 additions & 1 deletion YIM2UL2ET/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@
| 13차시 | 2024.04.01 | BFS | [BOJ 7569](https://www.acmicpc.net/problem/7569) | [BOJ 7569 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/42) |
| 14차시 | 2024.04.04 | 우선순위 큐 | [BOJ 11286](https://www.acmicpc.net/problem/11286) | [BOJ 11286 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/43) |
| 15차시 | 2024.04.09 | 구현 | [BOJ 14719](https://www.acmicpc.net/problem/14719) | [BOJ 14719 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/48) |
| 16차시 | 2024.04.09 | 구현 | [BOJ 15927](https://www.acmicpc.net/problem/15927) | [BOJ 15927 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/51) |
| 16차시 | 2024.04.11 | 애드 혹 | [BOJ 15927](https://www.acmicpc.net/problem/15927) | [BOJ 15927 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/51) |
| 17차시 | 2024.04.15 | DP | [BOJ 11726](https://www.acmicpc.net/problem/11726) | [BOJ 11726 풀이](https://github.com/AlgoLeadMe/AlgoLeadMe-7/pull/53) |

---

0 comments on commit b2c85a2

Please sign in to comment.