[20250929] BOJ / P2 / 준하의 정수론 과제 (Divmaster) / 권혁준 #997
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/16136
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
길이 N인 수열에 아래 두 종류의 쿼리를 처리해보자.
🔍 풀이 방법
어떤 수 N의 약수의 개수는 O(logN)임.
그래서 N을 수렴시키는데 필요한 갱신 횟수가 매우 낮음.
f(x) = x의 약수의 개수g(x) = x의 남은 갱신 횟수⏳ 회고
자바 추가 시간이 없어서 시간 제한이 좀 빡빡한 듯