Skip to content

Conversation

@LiiNi-coder
Copy link
Contributor

🧷 문제 링크

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

🧭 풀이 시간

40 분

👀 체감 난이도

✏️ 문제 설명

N개의 숫자가 주어질 때 합이 0이 되는 3인조를 만들 수 있는 경우의 수를 출력하기

🔍 풀이 방법

  • 정렬 + 투포인터로 사용하고 첫번째 숫자를 고정하고 나머지 두 숫자를 투포인터로 구함

⏳ 회고

  • left * right 의 값이 int를 넘을 수 있다는 것을 간과해서 시간이 좀 지체되었었다. 곱하기는 자료형을 반드시 신경써줘.

@ShinHeeEul ShinHeeEul merged commit 47d0aad into main Jul 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants