-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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.
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]) |
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.
κΈ°λ³Έ μ λ ¬ κΈ°μ€μ μμμλΆν°λΌ νμ μκΈ΄νλ°,
λ λͺ νν μλλ₯Ό 보μ¬μ£Όλ κ² κ°κΈ΄ νλ€μ
π
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.
μμ κ·Έλ¬λ€μ?? μ§λ PRμ΄λ λΉμ·ν λλμ΄λΌμ μ λ ¬νκ³ νμμλλ€1!
μλ κ·Όλ°... μλ²½μ μ¨λ μ PRμ΄ μμ΄...μ‘λ€μ ...????? κ΅μ₯ν λΉν©μ€λ¬μ΄λ°,, ν λΉ PRμ΄λΌλ 리뷰ν΄μ£Όμ μ κ°μ¬ν©λλ€ (_ _)
λ¦μμ§λ§ μ νμ΄ λ°©ν₯μ±μ
#262 μ΄κ±°μ λΉμ·ν΄μ! κΈ°μ΅μ λλ¬μ΄ 보μλ©΄,, μ²μμ μμμκ° κΈ°μ€μΌλ‘ μ λ ¬νλ€κ° λλλ μκ° μμλλ‘ μ λ ¬νλ κ²μΌλ‘ λ‘μ§μ λ°κΏ¨λ κ²μΌλ‘ κΈ°μ΅ν©λλ€,,,
λ€μμ μ« λ PR λ§λ¬΄λ¦¬μ μ κ²½μ°κ² μ΅λλ€μ π
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.
μλ 좩격μ μΈκ±° λ°κ²¬...
μ΄λ² PR λ¬Έμ λ§ν¬κ° μλͺ» κ±Έλ €μλ€μ ....
μ΅μ νμμ€ κ°μ μ΄ λ¬Έμ μμ΅λλ€,,
λμ°Έμ¬λ PRμ΄μλ€μ ,,, π€―π£π£π£π£π£
π λ¬Έμ λ§ν¬
νμμ€ λ°°μ
βοΈ μμλ μκ°
50M
β¨ μλ μ½λ
π μλ‘κ² μκ²λ λ΄μ©