Skip to content
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

38-H0ngJu #263

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import sys
import heapq

def input() : return sys.stdin.readline().rstrip()

N = int(input()) # 100000
info = [tuple(map(int, input().split())) for _ in range(N)]
room = []

info.sort(key=lambda x: x[0])
Copy link
Member

Choose a reason for hiding this comment

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

κΈ°λ³Έ μ •λ ¬ 기쀀은 μ•žμ—μ„œλΆ€ν„°λΌ ν•„μš” μ—†κΈ΄ν•œλ°,

더 λͺ…ν™•ν•œ μ˜λ„λ₯Ό λ³΄μ—¬μ£ΌλŠ” 것 κ°™κΈ΄ ν•˜λ„€μš”

πŸ‘

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

μ•„μ•„ κ·ΈλŸ¬λ„€μš”?? μ§€λ‚œ PRμ΄λž‘ λΉ„μŠ·ν•œ λŠλ‚Œμ΄λΌμ„œ μ •λ ¬ν•˜κ³  ν’€μ—ˆμ”λ‹ˆλ‹€1!


μ•„λ‹ˆ 근데... μƒˆλ²½μ— 써둔 제 PR이 μ—†μ–΄...μ‘Œλ„€μš” ...????? ꡉμž₯히 λ‹Ήν™©μŠ€λŸ¬μš΄λ°,, ν……λΉˆ PR이라도 λ¦¬λ·°ν•΄μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€ (_ _)

λŠ¦μ—ˆμ§€λ§Œ 제 풀이 λ°©ν–₯성은

#262 이거와 λΉ„μŠ·ν•΄μš”! 기얡을 더듬어 보자면,, μ²˜μŒμ— μ‹œμž‘μ‹œκ°„ κΈ°μ€€μœΌλ‘œ μ •λ ¬ν–ˆλ‹€κ°€ λλ‚˜λŠ” μ‹œκ°„ μˆœμ„œλŒ€λ‘œ μ •λ ¬ν•˜λŠ” κ²ƒμœΌλ‘œ λ‘œμ§μ„ λ°”κΏ¨λ˜ κ²ƒμœΌλ‘œ κΈ°μ–΅ν•©λ‹ˆλ‹€,,,

λ‹€μŒμ—” 쫌 더 PR λ§ˆλ¬΄λ¦¬μ— μ‹ κ²½μ“°κ² μŠ΅λ‹ˆλ‹€μš” 😭

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

μ•„λ‹ˆ 좩격적인거 발견...

이번 PR 문제 링크가 잘λͺ» κ±Έλ €μžˆλ„€μš” ....
μ΅œμ†Œ νšŒμ˜μ‹€ 개수 이 λ¬Έμ œμ˜€μŠ΅λ‹ˆλ‹€,,

λŒ€μ°Έμ‚¬λ‚œ PRμ΄μ—ˆλ„€μš” ,,, πŸ€―πŸ’£πŸ’£πŸ’£πŸ’£πŸ’£

heapq.heappush(room, info[0][1])
answer = 1

for i in range(1,N):
a, b = info[i][0], info[i][1]
if a >= room[0]:
heapq.heappop(room)
heapq.heappush(room, b)

print(len(room))
Loading