You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
문제 링크
https://www.acmicpc.net/problem/2473
문제 조건
아이디어
이 때 세 용액을 더하면 int 범위를 초과할 수 있으므로 long을 사용해야 한다.
시간 복잡도
N번 도는 for문 안에서 L, R 포인터가 N번 움직이므로 O(N^2)이다. N의 최댓값이 3000이므로 시간 안 풀이가 가능하다.
구현
All reactions