Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- BFS
- level2
- dict
- 힙
- programmers
- 브루트포스
- 수학
- MYSQL
- 딕셔너리
- 다익스트라
- 스택
- 프로그래머스
- N과M
- 백준
- 코딩테스트
- 다이나믹 프로그래밍
- dfs
- 파이썬
- 운영체제
- 가상메모리 관리
- level0
- 그리디
- DP
- python
- 구현
- BOJ
- 재귀
- level3
- level1
- 가상메모리
Archives
- Today
- Total
목록14241 (1)
동캄의 코딩도장
백준 14241 [슬라임 합치기] 파이썬
https://www.acmicpc.net/problem/14241 14241번: 슬라임 합치기 영선이와 효빈이는 슬라임을 합치는 게임을 하고 있다. 두 사람은 두 슬라임을 골라서 하나로 합쳐야 한다. 게임은 슬라임이 하나 남았을 때 끝난다. 모든 슬라임은 양수 크기를 가지고 있다. 두 www.acmicpc.net #백준 14241 import sys import heapq n=int(sys.stdin.readline()) lst=list(map(int,sys.stdin.readline().split())) heapq.heapify(lst) ans=0 for i in range(n-1): x=heapq.heappop(lst) y=heapq.heappop(lst) ans+=x*y heapq.heappush..
코테/BOJ
2022. 9. 4. 23:51