Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hyeokbini/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
| 15์ฐจ์‹œ | 2025.07.22 | ๊ทธ๋ฆฌ๋””, ์ˆ˜ํ•™ | [์„ธ ์ˆ˜, ๋‘ M](https://www.acmicpc.net/problem/2405)|[#15](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/56)|
| 16์ฐจ์‹œ | 2025.07.29 | ๊ตฌํ˜„, ์žฌ๊ท€ | [ZOAC](https://www.acmicpc.net/problem/16719)|[#16](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/57)|
| 17์ฐจ์‹œ | 2025.08.03 | ๊ตฌํ˜„, ์žฌ๊ท€ | [๋ณ„ ์ฐ๊ธฐ - 10](https://www.acmicpc.net/problem/2447)<br>[๋ณ„ ์ฐ๊ธฐ - 11](https://www.acmicpc.net/problem/2448) | [#17](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/59) |
| 18์ฐจ์‹œ | 2025.08.07 | ๋ธŒ๋ฃจํŠธํฌ์Šค | [์•ฝ์† ์žฅ์†Œ](https://www.acmicpc.net/problem/25542)|[#18](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/66)|
| 18์ฐจ์‹œ | 2025.08.07 | ๋ธŒ๋ฃจํŠธํฌ์Šค | [์•ฝ์† ์žฅ์†Œ](https://www.acmicpc.net/problem/25542)|[#18](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/66)|
| 20์ฐจ์‹œ | 2025.08.14 | ์™„์ „ํƒ์ƒ‰,DFS | [๋ชจ์Œ์‚ฌ์ „](https://school.programmers.co.kr/learn/courses/30/lessons/84512)|[#20](https://github.com/AlgoLeadMe/AlgoLeadMe-15/pull/72)|
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include <string>
#include <vector>

using namespace std;

char arr[5] = {'A','E','I','O','U'};
string checkstring;
int count = -1; // ๋นˆ ๋ฌธ์ž์—ด(์ œ์ผ ์ดˆ๊ธฐ ์ƒํƒœ)์—์„œ๋„ count++๊ฐ€ ํ˜ธ์ถœ๋˜๋ฏ€๋กœ -1์—์„œ ์‹œ์ž‘ํ•ด์•ผ ํ•จ
int answer;

void func(string curword)
{
// ๊ธฐ์ €์กฐ๊ฑด - ๊ธธ์ด 5 ์ดˆ๊ณผ๋˜๋ฉด return
if(curword.length() > 5)
{
return;
}

// ํ˜ธ์ถœ๋  ๋•Œ๋งˆ๋‹ค ์นด์šดํŠธ ์ฆ๊ฐ€
count++;

if(curword == checkstring)
{
answer = count;
return;
}

for(int i = 0; i < 5; i++)
{
func(curword + arr[i]);
}
}

int solution(string word) {
checkstring = word;
func("");
return answer;
}