Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

[2023-10-09] sumin #312#326

Merged
ksumini merged 1 commit into
mainfrom
sumin-#312
Oct 9, 2023
Merged

[2023-10-09] sumin #312#326
ksumini merged 1 commit into
mainfrom
sumin-#312

Conversation

@ksumini
Copy link
Copy Markdown
Contributor

@ksumini ksumini commented Oct 9, 2023

PR Summary

풀이시간: 15분

<input>
n: 자동차의 개수(1 ≤ n ≤ 50,000)
q: 질의의 개수(1 ≤ q ≤ 200,000)

<solution>
3대의 자동차에 대해서만 테스트가 가능하기 때문에
[중앙값보다 작은 수들, 중앙값, 중앙값보다 큰 수들]라고 생각했을 때
중앙값보다 작은 수들 * 중앙값보다 큰 수들은 모든 경우의 수가 된다.

<시간복잡도>
O(NlogN + QlogN)

@ksumini ksumini added the Softeer label Oct 9, 2023
@ksumini ksumini self-assigned this Oct 9, 2023
Copy link
Copy Markdown
Member

@Woo-Yeol Woo-Yeol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 저도 수민님과 같은 형식으로 풀이를 진행했어서 큰 피드백은 없습니다! 고생하셨어요 수민님!!

Copy link
Copy Markdown
Contributor

@zsmalla zsmalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이진 탐색 Task를 bisect 라이브러리로 깔끔하고 간결하게 풀이해내신 것 같습니다! 수민님께서 공유해주신 링크 덕에 잘 이해하고 넘어갈 수 있을 것 같아요! 감사합니다~!

Comment thread Softeer/자동차 테스트/sumin.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bisect 라이브러리를 이렇게 활용할 수 있다는 것을 알아갑니다!

Copy link
Copy Markdown
Contributor

@limstonestone limstonestone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수민님 덕분에 bisect 라이브러리에 대해서 더 잘 이해할 수 있었습니다!!
감사합니다 ~!

@ksumini ksumini merged commit 11333c7 into main Oct 9, 2023
@ksumini ksumini deleted the sumin-#312 branch October 9, 2023 13:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Softeer] [HSAT 7회 정기 코딩 인증평가 기출] 자동차 테스트

4 participants