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

38-H0ngJu #263

merged 1 commit into from
Jan 17, 2025

Conversation

H0ngJu
Copy link
Collaborator

@H0ngJu H0ngJu commented Jan 5, 2025

πŸ”— 문제 링크

νšŒμ˜μ‹€ λ°°μ •

βœ”οΈ μ†Œμš”λœ μ‹œκ°„

50M

✨ μˆ˜λ„ μ½”λ“œ

image

πŸ“š μƒˆλ‘­κ²Œ μ•Œκ²Œλœ λ‚΄μš©

Copy link
Member

@tgyuuAn tgyuuAn left a comment

Choose a reason for hiding this comment

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

import sys

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

N = int(input())
meetings = []
for _ in range(N):
    start, end = map(int, input().split())
    meetings.append((start, end))
    
meetings.sort(reverse = True)
answer = 0
now = []
while meetings:
    now_start, now_end = meetings.pop()
    
    while now and now[-1][1] > now_end:
        now.pop()
    
    if not now or (now and now_start >= now[-1][1]):
        now.append((now_start, now_end))
        
    answer = max(answer, len(now))

print(answer)

μ €λŠ” while 문으둜 μ’…λ£Œλœ 회의λ₯Ό μ°¨μ°¨μ°¨μ°© λΉΌλŠ” λ‘œμ§μ„ μΆ”κ°€ν–ˆλŠ”λ°,

heapμœΌλ‘œλ„ ν’€ 수 μžˆκ΅°μš”...

ν—ˆν—ˆ....

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€ 홍μ₯¬λ₯΄~~~~

μš°ν…Œμ½” ν”„λ‘ νŠΈ μ½”μŠ€λ„ μΆ”μΉ΄μΆ”μΉ΄ 뽕 μž…λ‹ˆλ‹€ ~~~ πŸ‘πŸ‘πŸ‘

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μ΄μ—ˆλ„€μš” ,,, πŸ€―πŸ’£πŸ’£πŸ’£πŸ’£πŸ’£

@H0ngJu H0ngJu merged commit 5acb83c into main Jan 17, 2025
6 checks passed
@H0ngJu H0ngJu deleted the 38-H0ngJu branch January 17, 2025 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants