목록알고리즘 (1)
waystring 님의 블로그
둘레가 n이고 세 변이 자연수인 삼각형의 수 - 백준 2622번 O(1), O(n)
https://www.acmicpc.net/problem/2622 이 문제를 $\mathcal{O} (1)$과 $\mathcal{O} (n)$의 시간으로 해결하겠다.$\mathcal{O} (1)$ 알고리즘https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=b9b5d4997aad1fef74e084e708cc8d49d7466b70 증명은 위의 논문 내용을 바탕으로 한다. 둘레가 $n$이고 세 변이 자연수인 삼각형의 수를 $T_{n}$이라고 하자. 그러면 $$T_n = \begin{cases} \text{round}\left(\displaystyle \frac{(n + 3)^2}{48}\right) & \text{if} \; n \; \text{is..
코딩
2024. 8. 5. 16:52