Conversation
- 문제 접근에 주의 - dp는 사이클이 생기면 안됨! - 완탐에서 최단거리? -> BFS - **주사위를 굴려 이동한 칸**이 뱀 또는 사다리이면 타고 이동함 - 즉, 주사위를 굴려서 사다리인 칸에 도착했는데, 해당 칸에 또 사다리가 있어도 이동하지 않음! - 그러면 우선 6번의 주사위를 굴리면서 방문하지 않았는데, 사다리 또는 뱀이면 무조건 타야하므로 도착한 좌표로 변환하고 그 좌표를 큐에 넣어준다!
- 투 포인터로 해결 가능 - right를 하나씩 증가시키면서 과일을 보고 - map[과일 종류]++; 를 증가시킴 - map.size가 2보다 크면 - while(map.size() > 2) // 2가지 종류가 될 때까지 left를 증가시킴 - map[left]--; - 개수가 0이면 과일을 제거 - left++; - 과일 개수 갱신! (r - l + 1)
<조건> 다른 모든 지원자와 비교했을 때 서류심사 성적과 면접시험 성적 중 적어도 하나가 다른 지원자보다 떨어지지 않는 자만 선발한다 - 서류, 면접이 순위가 작은 순으로 정렬 - 서류 순위가 작은(높은)순으로 보면 (이미 한 성적은 떨어짐) 면접 순위가 temp보다 작거나 같으면 (면접에 대해 순위가 높으면) 뽑힘 (temp값을 갱신)
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
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.
💼 신입 사원
<조건>
다른 모든 지원자와 비교했을 때 서류심사 성적과 면접시험 성적 중 적어도 하나가 다른 지원자보다 떨어지지 않는 자만 선발한다
면접 순위가 temp보다 작거나 같으면 (면접에 대해 순위가 높으면) 뽑힘 (temp값을 갱신)
😷 미세먼지 안녕!
궁금한 점
미세먼지 문제에서 공기청정기 작동을 더 쉽게 하는 방법이 있는지 궁금합니다!