[20250927] BOJ / G3 / 괄호 추가하기 / 이강현 #986
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/16637
🧭 풀이 시간
30분
👀 체감 난이도
✏️ 문제 설명
연산자간 우선순위는 원래 없음. 무조건 앞에서 부터
괄호를 쓰면 괄호부터 계산함. 괄호는 중첩되지 않음.
이때 괄호를 적절히 써서 수식 결과의 최댓값을 출력.
🔍 풀이 방법
브루트포스
앞에서부터 괄호를 넣는 경우와 안 넣는 경우로 분기함.
⏳ 회고
문자열 다루는거 헷갈려 ㅠ