We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a795c9 commit a64f088Copy full SHA for a64f088
15/3.py
@@ -7,12 +7,12 @@
7
array.append(int(input()))
8
array.sort() # 이진 탐색 수행을 위해 정렬 수행
9
10
-start = array[1] - array[0] # 집의 좌표 중에 가장 작은 값
11
-end = array[-1] - array[0] # 집의 좌표 중에 가장 큰 값
+start = 1 # 가능한 최소 거리 차이(min gap)
+end = array[-1] - array[0] # 가능한 최대 거리 차이(max gap)
12
result = 0
13
14
while(start <= end):
15
- mid = (start + end) // 2 # mid는 가장 인접한 두 공유기 사이의 거리(Gap)을 의미
+ mid = (start + end) // 2 # mid는 가장 인접한 두 공유기 사이의 거리(gap)을 의미
16
# 첫째 집에는 무조건 공유기를 설치한다고 가정
17
value = array[0]
18
count = 1
0 commit comments