https://school.programmers.co.kr/learn/courses/30/lessons/42628 ํ๋ก๊ทธ๋๋จธ์ค์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์
๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์
๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์.programmers.co.kr โ
1์ฐจ ํ์ด import heapqdef solution(operations): heap = [] for operation in operations: [inst, value] = operation.split(' ') value = int(value) if inst == 'I': # heap ์ฝ์
heapq.hea..
https://school.programmers.co.kr/learn/courses/30/lessons/42626?language=python3 ํ๋ก๊ทธ๋๋จธ์ค์ฝ๋ ์ค์ฌ์ ๊ฐ๋ฐ์ ์ฑ์ฉ. ์คํ ๊ธฐ๋ฐ์ ํฌ์ง์
๋งค์นญ. ํ๋ก๊ทธ๋๋จธ์ค์ ๊ฐ๋ฐ์ ๋ง์ถคํ ํ๋กํ์ ๋ฑ๋กํ๊ณ , ๋์ ๊ธฐ์ ๊ถํฉ์ด ์ ๋ง๋ ๊ธฐ์
๋ค์ ๋งค์นญ ๋ฐ์ผ์ธ์.programmers.co.kr โ 1์ฐจ ํ์ดimport heapqmin_heap = []def solution(scoville, K): heapq.heapify(scoville) count = 0 while scoville: # popํ ๊ฐ์ด k์ด์์ด๋๋ฉด, while ์ข
๋ฃ min_value = heapq.heappop(scoville) if mi..
๐ฅ Gold4https://www.acmicpc.net/problem/13975 โ 1์ฐจํ์ดimport sysfrom collections import dequeinput = sys.stdin.readlinen=int(input())for _ in range(n): m=int(input()) nums=sorted(list(map(int,input().strip().split()))) queue=deque(nums) result=0 while len(queue)>=1: if len(queue)==1: print(result) break temp=queue[0]+queue[1] ..
๐ฅ Silver2https://www.acmicpc.net/problem/2075 โ 1์ฐจ ํ์ดimport sys# maxHeap# ์ค๋ง๋ค ๊ฐ์ฅ ํฐ ๊ฐ ๋น๊ตํ ๊ฐ์ฅ ํฐ ๊ฐ์ popinput = sys.stdin.readlinen=int(input())heap=[]temp=[]for _ in range(n): temp.append(list(map(int,input().split())))#์ธ๋ก์ค๋ก heap ์์ฑheap_list=[]for i in range(n): #row t=[] for j in range(n): #col t.append(temp[j][i]) heap_list.append(t)print(heap_list)# ๋ฆฌ์คํธ ์ํํ๋ฉด์ ๊ฐ์ฅ ํฐ ์ ๋ฝ๊ธฐfor i ..
'ํ' ํ๊ทธ์ ๊ธ ๋ชฉ๋ก
๋จ์ถํค
๋ด ๋ธ๋ก๊ทธ
๋ด ๋ธ๋ก๊ทธ - ๊ด๋ฆฌ์ ํ ์ ํ |
Q
Q
|
์ ๊ธ ์ฐ๊ธฐ |
W
W
|
๋ธ๋ก๊ทธ ๊ฒ์๊ธ
๊ธ ์์ (๊ถํ ์๋ ๊ฒฝ์ฐ) |
E
E
|
๋๊ธ ์์ญ์ผ๋ก ์ด๋ |
C
C
|
๋ชจ๋ ์์ญ
์ด ํ์ด์ง์ URL ๋ณต์ฌ |
S
S
|
๋งจ ์๋ก ์ด๋ |
T
T
|
ํฐ์คํ ๋ฆฌ ํ ์ด๋ |
H
H
|
๋จ์ถํค ์๋ด |
Shift + /
โง + /
|
* ๋จ์ถํค๋ ํ๊ธ/์๋ฌธ ๋์๋ฌธ์๋ก ์ด์ฉ ๊ฐ๋ฅํ๋ฉฐ, ํฐ์คํ ๋ฆฌ ๊ธฐ๋ณธ ๋๋ฉ์ธ์์๋ง ๋์ํฉ๋๋ค.