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
- 프로그래머스
- dict
- programmers
- 파이썬
- 운영체제
- 재귀
- N과M
- BFS
- level2
- 다익스트라
- level3
- level0
- 힙
- python
- dfs
- BOJ
- 브루트포스
- 딕셔너리
- 코딩테스트
- 구현
- 가상메모리
- 백준
- 다이나믹 프로그래밍
- 스택
- MYSQL
- 그리디
- 가상메모리 관리
- DP
- level1
- 수학
Archives
- Today
- Total
목록롤케이크 자르기 (1)
동캄의 코딩도장
프로그래머스 level2 [롤케이크 자르기] 파이썬
https://school.programmers.co.kr/learn/courses/30/lessons/132265 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr from collections import defaultdict def solution(topping): answer = 0 a=defaultdict(int) # 형 롤케잌 b=defaultdict(int) # 동생 롤케잌 for t in topping: # 형이 롤케잌 다 가져감 a[t]+=1 for t in topping: #제일 끝부터 하나씩 동생에게 떼어줌 a[t]-=1 if a[t]==..
코테/프로그래머스
2023. 4. 6. 00:12