Skip to content

Conversation

@LiiNi-coder
Copy link
Contributor

@LiiNi-coder LiiNi-coder commented Nov 25, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/16438

🧭 풀이 시간

1시간 10분

👀 체감 난이도

✏️ 문제 설명

  • 원숭이 N마리가 있는데, 7번 N마리에 대해서 팀을 지정해야한다. 단, 모든 원숭이 두명마다 반드시 한번은 적으로 만나도록 7번 팀을 지정하는 경우의 수를 7번만 출력

🔍 풀이 방법

  • 분할정복

⏳ 회고

  • 분할정복의 기본 구조 ( solve(int level, int start, int end, boolean isB))를 따르지않고, 내 멋대로 q 2개를 써서 풀긴했다. 그런데 이것을 하느라 시간이 많이 소모가 되었음.
  • 아래와 같은 동적반복에서 분할정복을 어떻게 쓸지 연습을 해야겠다.
// putString(0, N/2, false)+putString(N/2, N, true);
// putString(0, N/4, false) + putString(N/4, N/2, true) + putString(N/2, N*3/4, false) + putString(N*3/4, N, true)
//....
  • 또한 Char[] -> String 하기위해선 String.valueOf(char[]) 를 쓰면된다

@LiiNi-coder LiiNi-coder added the success 👍 해설을 보지 않고 풀었을 때 label Nov 25, 2025
@ShinHeeEul ShinHeeEul merged commit 78cceb9 into main Nov 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants