[Programmers] Level 2. 지게차와 크레인
·
코딩테스트/Python
🔗 Problem Link 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr❔Thinking컨테이너를 빼내는 요청이 주어질 때, 모든 요청을 수행하고 남은 컨테이너 수를 반환한다.컨테이너는 빼내는 요청은 두가지로 나뉜다.알파벳 1개 : 해당 컨테이너를 지게차로 꺼낸다. 지게차는 외부와 맞닿은 컨테이너만 꺼낼 수 있다.알파벳 2개 : 해당 컨테이너를 크레인으로 꺼낸다. 크레인은 모든 컨테이너를 조건없이 꺼낼 수 있다.💻Solutionfrom collections import dequedef solution(storage, requests): def fork_lift(target:str): ..
[Beakjoon] 1922. 네트워크 연결
·
코딩테스트/Python
🔗 Problem Linkhttps://www.acmicpc.net/problem/1922❔Thinking모든 컴퓨터가 연결되어야 할 때, 최소한의 비용을 반환한다.각 컴퓨터를 연결하는 비용이 주어진다.💻Solutionimport sysimport heapqinput = sys.stdin.readlineN = int(input().rstrip())M = int(input().rstrip())lines = []for _ in range(M): a,b,c = map(int, input().split()) heapq.heappush(lines, (c,a,b))def find_parent(x, parent): if x != parent[x]: parent[x] = find_par..
[Programmers] Level 2. 유사 칸토어 비트열
·
코딩테스트/Python
🔗 Problem Link 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr❔Thinkingn-1번째의 1은 11011로, 0은 00000으로 치환한다. (0번째는 1)1 l과 r 구간이 주어질 때, 해당 구간의 1의 개수를 반환한다. (l과 r은 폐구간)💻Solutiondef solution(n, l, r): answer = 0 for i in range(l-1, r): while True: if i % 5 == 2: break elif i 🗝️keypointn이 20까지이기 때문에, 5^20은 시간 내에 반복..
[Baekjoon] 2294. 동전 2
·
코딩테스트/Python
🔗 Problem Linkhttps://www.acmicpc.net/problem/2294❔Thinkingn개 종류의 동전을 활용해서, k원을 만드는 최소한의 동전 개수를 반환한다. k원을 만들 수 없다면 -1을 반환한다.1💻Solution1. DP를 활용한 풀이import sysinput = sys.stdin.readlinen, k = map(int, input().split())coins = []for _ in range(n): coins.append(int(input().rstrip()))coins.sort()answer = [float('inf') for _ in range(k+1)]answer[0] = 0for i in range(1, k+1): for coin in coins: ..
[논문리뷰] U-Net: Convolutional Networks for Biomedical Image Segmentation
·
논문리뷰/Computer Vision
Paper U-Net: Convolutional Networks for Biomedical Image SegmentationThere is large consent that successful training of deep networks requires many thousand annotated training samples. In this paper, we present a network and training strategy that relies on the strong use of data augmentation to use the available annotatedarxiv.orgAbstract딥러닝 학습에는 수천 개 이상의 annotation 학습 데이터가 필요하다.context 포착을 위한 ..
[Programmers] Level 2. 도넛과 막대 그래프
·
코딩테스트/Python
🔗 Problem Link 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr❔Thinking사이클을 이루는 도넛모양 그래프, 한줄로 이어진 막대 그래프, 동일한 도넛 모양 2개가 이어진 8자 모양 그래프의 각 개수를 반환한다.그래프를 이루는 정점 이외에 하나의 생성점이 각 그래프와 연결되어 있고, 이 생성점도 찾아 반환한다.💻Solutionfrom collections import defaultdict, dequedef solution(edges): answer = [0, 0, 0, 0] start, donut, bar, eight = 0, 1, 2, 3 graph = defaultdi..