Skip to content

Commit

Permalink
Merge pull request #67 from AlgoLeadMe/16-bomik0221
Browse files Browse the repository at this point in the history
16-bomik0221
  • Loading branch information
bomik0221 authored Mar 1, 2024
2 parents a698fc7 + 6483c24 commit 0ceee9a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions bomik0221/DP/240224.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include <iostream>
#include <vector>

int main() {
int N; std::cin >> N;
std::vector<int> game(N+1, 0);
game[1] = 1; game[3] = 1; //์ƒ๊ทผ์ด๋Š” 1, ์ฐฝ์˜์ด๋Š” 2

for (int i = 2; i <= N; i++) {
if (game[i - 1] == 1) {
game[i] = 2;
if(i+2 <=N) game[i + 2] = 2;
}
else {
game[i] = 1;
if (i + 2 <= N) game[i + 2] = 1;
}
}

if (game[N] == 1) std::cout << "SK";
else std::cout << "CY";

return 0;
}
1 change: 1 addition & 0 deletions bomik0221/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
| 13์ฐจ์‹œ | 2024.02.06 | DFS | [์œ ๊ธฐ๋† ๋ฐฐ์ถ”](https://www.acmicpc.net/problem/1012) | [#51](https://github.com/AlgoLeadMe/AlgoLeadMe-5/pull/51) |
| 14์ฐจ์‹œ | 2024.02.15 | ์œ„์ƒ์ •๋ ฌ | [์ค„ ์„ธ์šฐ๊ธฐ](https://www.acmicpc.net/problem/2252) | [#57](https://github.com/AlgoLeadMe/AlgoLeadMe-5/pull/57) |
| 15์ฐจ์‹œ | 2024.02.18 | ์œ„์ƒ์ •๋ ฌ | [๋ฌธ์ œ์ง‘](https://www.acmicpc.net/problem/1766) | [#60](https://github.com/AlgoLeadMe/AlgoLeadMe-5/pull/60) |
| 16์ฐจ์‹œ | 2024.02.24 | DP | [๋Œ ๊ฒŒ์ž„](https://www.acmicpc.net/problem/9655) | [#67](https://github.com/AlgoLeadMe/AlgoLeadMe-5/pull/67) |
---

0 comments on commit 0ceee9a

Please sign in to comment.