Skip to content

Conversation

@lkhyun
Copy link
Contributor

@lkhyun lkhyun commented Aug 10, 2025

🧷 문제 링크

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

🧭 풀이 시간

180분

👀 체감 난이도

✏️ 문제 설명

배열이 주어짐.
세 수의 합이 배열 안에 있을때, 가장 큰 합을 출력.

🔍 풀이 방법

hashset, 반복문 풀기?
원래 4개의 수를 찾아야하니까 N^4인데
식을 a+b = c -d로 변형해서
a+b를 O(N^2)으로 저장해두고 c-d를 O(N^2)으로 찾으면 된다.

⏳ 회고

이분 탐색으로 어거지로 풀라다가 실패.
혁준아 반례 찾았음
7
20
30
50
70
80
90
100
초반에 70으로 잡고 시작하고 100부터 시작하니까 이거보다 무조건 작아서 범위 확장하는데,
20 30 50이 100이라서 거기를 고려 안하더라고

@lkhyun lkhyun self-assigned this Aug 10, 2025
@lkhyun lkhyun added hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 timeout ⌚ 목표 시간보다 오래걸렸을 때 labels Aug 10, 2025
@ShinHeeEul ShinHeeEul merged commit d134374 into main Aug 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hint 💡 반례를 참고했거나 힌트를 얻고 풀었을 때 timeout ⌚ 목표 시간보다 오래걸렸을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants