-
Notifications
You must be signed in to change notification settings - Fork 5
Hongjoo / 4월 2주차 / 6개 #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YoonYn9915
approved these changes
Apr 14, 2025
Member
YoonYn9915
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
방문 여부를 bitmasking을 통해 저장해야 한다는게 새로웠습니다.
좋은 과제를 내 주셔서 연습에 도움이 된거 같아요! 한주 수고하셨습니다.
Mingguriguri
approved these changes
Apr 14, 2025
🔥2025-04 챌린지 진행 상황👉 그래프
👉 DP
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

🌱WIL
🚀주간 목표 문제 수: 5개
*코드 트리는 문제번호가 존재하지 않아서 출제일시로 작성하였습니다.(ex: 2024020201 : 2024년 하반기 오후 1번문제)
백준 #10844. 쉬운 계단수: DP / 실버1
정리한 링크: (바로가기)
🚩플로우 (선택)
DP 테이블 정의 : 2차원 배열(1차도 가능)
DP[ i : 1~N] [ j : 0 - 9]: 길이가 i 고, 뒷자리가 J 인 계단수의 개수i : 길이
j : 마지막 숫자
초기값
dp [1][0] = 0# 0 으로 시작하는 계단수가 아님dp[1] [1 - 9] = 1점화식
Case 1 ) j 가 1~ 8일때
dp[i][j] = d[i-1][j-1] +dp[i-1][j+1]Case 2 ) j == 0 일 때 → 십의 자리 숫자가 1만 가능
dp[i][0] = dp[i-1][1]Case 3 ) j == 9 일때 → 십의 자리 숫자가 8일 때만 가능
dp[i][9] = dp[i-1][8]🚩제출한 코드
💡TIL
##백준 #1562. 계단수: 비트마스킹/ 골드1
정리한 링크: (바로가기)
🚩플로우 (선택)
🚩제출한 코드
💡TIL
백준 #1783. 병든나이트: 그리디 / 실버3
정리한 링크: (바로가기)
🚩플로우 (선택)
→ 이동 불가
세로 N = 2
→ 2가지 방법 { (2) 위 1 , 오른쪽 2 & (3) 아래 1 , 오른쪽2 } 만 가능
⇒ 최대 4개 ( 가로 칸수 7개 이상 가정)
세로 N ≥3
→ 4가지 이동 방법 모두 사용 가능
(1) 최대 칸수가 4 미만인 경우
→ 가로 길이 m 이 4 이하인 경우
(3) 최대 칸수가 4 이상인 경우
→ result 는 m-2 임
🚩제출한 코드
💡TIL
백준 #1541. 잃어버린 괄호: 그리디 / 실버2
정리한 링크: (바로가기)
🚩플로우 (선택)
🚩제출한 코드
💡TIL
좌표 문제라고 무조건 DFS , BFS 문제는 아니다 !
무턱대고 DFS, BFS 문제로 확신해서 접근하니 풀이 아이디어가 획일화 되고, 시야가 좁아진 것 같다. 이번 문제처럼 먼저 Testcase 동작 과정을 생각하고 , 풀이 유형에 대한 다양한 가능성을 열어두고 접근하자. 직관으로 풀이과정을 찍는 것이 아닌 논리로 해당 동작 과정을 psedo code 형태로 접근해서 해결하자.
백준 #2437. 저울: 그리디 / 골드2
정리한 링크: (바로가기)
🚩플로우 (선택)
총 N 개의 무게추를 뽑을 경우 , 1~ K(= N개의 무게추의 총합)의 무게를 측정할 수 있다고 가정
N+1 번째의 새로운 무게추 X 를 추가할 경우 ,
측정할 수 없는 무게가 생기는 경우는
기존 측정 가능 법위인 1
K 와 새로 측정 가능한 범위 (1K) * X 사이의 빈공간이 생길 경우빈공간이 생기는경우 :
1~K 까지는 측정 가능 →다음 측정할 K+1 의 측정 불가할 경우, 빈공간 발생
→ K+1 보다 X가 더 클 경우 ⇒ K+1 은 측정할 수 없는 최소값이 됨
🚩제출한 코드
💡TIL
백준 #9996. 한국이 그리울땐 서버에 접속하지: 문자열 / 실버3
정리한 링크: (바로가기)
🚩플로우 (선택)
🚩제출한 코드
💡TIL
코드트리 #2024010101. 고대문명 유적탐사: 시뮬레이션, 그래프/ lv15
정리한 링크: (바로가기)
🚩플로우 (선택)
모든 경우의 수
회전 (rotate)
회전한 field 에서 획득한 유물 수 반환 : get old
리스트에 저장
[유물 가치 , 회전 각도 , 중심 열 ,중심 행 , 삭제할 유물 ㅊ위치]
해당 턴에서 가장 Best 한 상황 선택
<조건>
(1) 유물 가치 ≠ 0 이면 종료
(2) 유물 가치 최대 → (3) 회전 각도 최소 (4) 중심좌표 열 최소 (5) 중심 좌표 행 최소
Best 한 상황에서 “유물 가치” 와 필드 상황 저장
fiedld 상황 유물 매꾸기
🚩제출한 코드
💡TIL
코드트리 #2024020101. 미지의 공간탈출: 시뮬레이션, 그래프/ lv14
정리한 링크: (바로가기)
🚩플로우 (선택)
3d의 시작 - 끝 , 2d의 시작, 끝 좌표 찾기
3d 의 최단 거리 (1 차 목적지 달성을 위한 BFS 최단 거리)
2d 의 최단 거리 (최종 목적지 까지 BFS 최단 거리)
🚩제출한 코드
💡TIL
코드트리 #2024020101. 메두사와 전사들: 시뮬레이션, 그래프/ lv15
정리한 링크: (바로가기)
🚩플로우 (선택)
BFS 로 메듀사 최단경로 찾기
메듀사의 이동 : 지정된 최단거리로 한칸 이동 (전사와 만날 경우 , 전사 삭제)
메듀사 시선 : 상하좌우 방향중 "가장 많이 stone 되는 방향" 선택
4, 전사의 이동 (한 칸씩 두번) : 메듀사 있는 경우 공격
🚩제출한 코드
💡TIL