목록Problem Solving (223)
Life Engineering
programmers.co.kr/learn/courses/30/lessons/42884 코딩테스트 연습 - 단속카메라 [[-20,15], [-14,-5], [-18,-13], [-5,-3]] 2 programmers.co.kr 1 2 3 4 5 6 7 8 9 10 11 12 13 def solution(routes): answer=0 visited=[False]*len(routes) routes.sort() for i in range(len(routes)-1,-1,-1): if not visited[i]: answer+=1 camera=routes[i][0] visited[i]=True for j in range(i-1,-1,-1): if not visited[j] and routes[j][0]
programmers.co.kr/learn/courses/30/lessons/43162 코딩테스트 연습 - 네트워크 네트워크란 컴퓨터 상호 간에 정보를 교환할 수 있도록 연결된 형태를 의미합니다. 예를 들어, 컴퓨터 A와 컴퓨터 B가 직접적으로 연결되어있고, 컴퓨터 B와 컴퓨터 C가 직접적으로 연결되어 있 programmers.co.kr 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 from collections import deque def bfs(computers, start, visited): queue=deque([start]) visited[start]=True while queue: v=queue.popleft() for i,compute..
www.acmicpc.net/problem/3190 3190번: 뱀 'Dummy' 라는 도스게임이 있다. 이 게임에는 뱀이 나와서 기어다니는데, 사과를 먹으면 뱀 길이가 늘어난다. 뱀이 이리저리 기어다니다가 벽 또는 자기자신의 몸과 부딪히면 게임이 끝난다. 게임 www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 N=int(input()) K=int(input()) apples=[] changes={} second=0 positions={(0,1):((-1,0),(1,0)), (1,0):((0,1),(0,-1)..
www.acmicpc.net/problem/3079 3079번: 입국심사 첫째 줄에 N과 M이 주어진다. (1 ≤ N ≤ 100,000, 1 ≤ M ≤ 1,000,000,000) 다음 N개 줄에는 각 심사대에서 심사를 하는데 걸리는 시간인 Tk가 주어진다. (1 ≤ Tk ≤ 109) www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 N, M=map(int, input().split()) T=[] for _ in range(N): T.append(int(input())) T.sort() start=1 end=T[-1]*M result=end while start=M: result=min(result,mid) end=mid..