diff --git "a/hyeokbini/9658.\353\217\214 \352\262\214\354\236\204 4/9658.cpp" "b/hyeokbini/9658.\353\217\214 \352\262\214\354\236\204 4/9658.cpp" new file mode 100644 index 0000000..568e2bc --- /dev/null +++ "b/hyeokbini/9658.\353\217\214 \352\262\214\354\236\204 4/9658.cpp" @@ -0,0 +1,38 @@ +#include + +using namespace std; + +int main() +{ + ios::sync_with_stdio(false); + cin.tie(0); + //freopen("test.txt", "rt", stdin); + int n; + cin >> n; + vector dp(n + 1); + dp[1] = false; + dp[2] = true; + dp[3] = false; + dp[4] = true; + for(int i = 5; i <= n; i++) + { + if(!dp[i - 4] || !dp[i - 3] || !dp[i - 1]) + { + dp[i] = true; + } + else + { + dp[i] = false; + } + } + + if(dp[n]) + { + cout << "SK"; + } + else + { + cout << "CY"; + } + return 0; +} diff --git a/hyeokbini/README.md b/hyeokbini/README.md index 43f1d9f..85ea1bf 100644 --- a/hyeokbini/README.md +++ b/hyeokbini/README.md @@ -24,3 +24,4 @@ | 20차시 | 2025.08.14 | 완전탐색,DFS | [모음사전](https://school.programmers.co.kr/learn/courses/30/lessons/84512)|[#20](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/72)| | 21차시 | 2025.08.19 | 브루트포스 | [제곱수 찾기](https://www.acmicpc.net/problem/1025)|[#21](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/76)| | 22차시 | 2025.08.22 | 그래프 탐색 | [차량 배치](https://www.acmicpc.net/problem/30206)|[#22](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/77)| + | 25차시 | 2025.09.10 | DP, 게임 이론 | [돌 게임 4](https://www.acmicpc.net/problem/9658)|[#22](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/90)|