목록2024/01/07 (4)
파란색가운의 개발 블로그
https://school.programmers.co.kr/learn/courses/30/lessons/60060/ 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문제 설명 [본 문제는 정확성과 효율성 테스트 각각 점수가 있는 문제입니다.] 친구들로부터 천재 프로그래머로 불리는 "프로도"는 음악을 하는 친구로부터 자신이 좋아하는 노래 가사에 사용된 단어들 중에 특정 키워드가 몇 개 포함되어 있는지 궁금하니 프로그램으로 개발해 달라는 제안을 받았습니다. 그 제안 사항 중, 키워드는 와일드카드 문자중 하나인 '?'가 포함된 패턴 형태의 문자열을 뜻합니다. 와..
https://www.acmicpc.net/problem/2110 문제 2110번: 공유기 설치 첫째 줄에 집의 개수 N (2 ≤ N ≤ 200,000)과 공유기의 개수 C (2 ≤ C ≤ N)이 하나 이상의 빈 칸을 사이에 두고 주어진다. 둘째 줄부터 N개의 줄에는 집의 좌표를 나타내는 xi (0 ≤ xi ≤ 1,000,000,000)가 www.acmicpc.net 도현이의 집 N개가 수직선 위에 있다. 각각의 집의 좌표는 x1, ..., xN이고, 집 여러개가 같은 좌표를 가지는 일은 없다. 도현이는 언제 어디서나 와이파이를 즐기기 위해서 집에 공유기 C개를 설치하려고 한다. 최대한 많은 곳에서 와이파이를 사용하려고 하기 때문에, 한 집에는 공유기를 하나만 설치할 수 있고, 가장 인접한 두 공유기 사..
import sys # sys.stdin.readline() from collections import deque sys.setrecursionlimit(100000000) import heapq import copy import itertools from itertools import combinations from itertools import permutations INF = 1e9 from bisect import bisect_left,bisect_right def findIndex(start,end): if start > end: return None mid = (start + end) // 2 if arr[mid] == mid: return mid elif arr[mid] > mid: retu..
import sys # sys.stdin.readline() from collections import deque sys.setrecursionlimit(100000000) import heapq import copy import itertools from itertools import combinations from itertools import permutations INF = 1e9 def findElem(x): n = len(arr) a = findFirstElem(0,n-1) b = findSecondElem(0,n-1) if a == None: return 0 else: return b-a+1 def findFirstElem(start,end): if start > end: return Non..