세그먼트트리1 백준 25112 / C++ https://www.acmicpc.net/problem/25112 25112번: Single-track railway The first line specifies the number of stations, $n$. In the second line, $n - 1$ numbers are given, corresponding to the initial travel times between the adjacent stations (the $i$-th number is the travel time between stations $i$ and $i + 1$). The third www.acmicpc.net [ 풀이 ] 매번 업데이트하면서 min(S[n]-2*S[i])를 찾아주는 문제이다. 펜윅트리로 업데이트해주.. 2022. 8. 12. 이전 1 다음