Algorithm/๋ฐฑ์ค
[๋ฐฑ์ค] #2110 ๊ณต์ ๊ธฐ ์ค์น (Python)
1. ๋ฌธ์ ์ค๋ช
๋ฌธ์ ๋งํฌ input : ์ฒซ์งธ ์ค : ์ง์ ๊ฐ์ N, ๊ณต์ ๊ธฐ์ ๊ฐ์ C ๋์งธ ์ค๋ถํฐ N๊ฐ์ ์ค: ์ง์ ์ขํ return : ์ฒซ์งธ ์ค์ ๊ฐ์ฅ ์ธ์ ํ ๋ ๊ณต์ ๊ธฐ ์ฌ์ด์ ์ต๋ ๊ฑฐ๋ฆฌ 2. ์ฝ๋ import sys input = sys.stdin.readline #์ง์ ํ ๊ฑฐ๋ฆฌ๋ฅผ ๊ธฐ์ค์ผ๋ก, ๊ณต์ ๊ธฐ๋ฅผ ๋ช๊ฐ ์ค์นํ ์ ์๋์ง N, C = map(int, (input().split()))#์ง, ๊ณต์ ๊ธฐ ๊ฐฏ์ house = [int(input()) for _ in range(N)] #์ง ์ขํ house = sorted(house) #์ด๋ถํ์์ ์ํ ์ ๋ ฌ def router_counter(distance): count = 1 cur_house = house[0] #์์์ for i in range(1, N):..