Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Feb 13, 2025

🧷 문제 링크

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

🧭 풀이 시간

120분

👀 체감 난이도

✏️ 문제 설명

순서가 정해져 있는 N개의 수 사이에 입력으로 주어진 N-1 개의 연산자를 끼워넣었을 때 최댓값과 최솟값을 구하는 문제

🔍 풀이 방법

백트래킹을 이용해서 수식이 만들어지는 모든 경우의 수를 구하고 이를 계산한다. 스택을 이용하여 연산자 우선순위를 고려한다.

⏳ 회고

문제 자체는 크게 어렵진 않은 거 같은데 연산자 우선순위가 존재해서 중간 중간 스택을 잘 이용해서 수식을 최적화 해야 했는데 지금 타이밍에서 앞에서 빼야하는지 뒤에서 빼야하는지가 자꾸 헷갈려서 오래 걸렸다....

@lkhyun lkhyun added the timeout ⌚ 목표 시간보다 오래걸렸을 때 label Feb 13, 2025
@lkhyun lkhyun self-assigned this Feb 13, 2025
@lkhyun lkhyun merged commit 78a7eef into main Feb 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

timeout ⌚ 목표 시간보다 오래걸렸을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants