-
Notifications
You must be signed in to change notification settings - Fork 0
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
[이지민] - 순회강연, 용액, 맥주 마시면서 걸어가기, 혼자서 하는 틱택토 #279
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.
고생하셨습니다!!
for i in range(n): | ||
p, d = classes[i] | ||
|
||
for j in range(d, 0, -1): |
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.
파이썬은 이런게 엄청 직관적인 것 같아 부럽습니다
maxi = max(maxi, classes[-1][1]) | ||
|
||
classes.sort(reverse=True) | ||
visited = [0 for _ in range(maxi + 1)] |
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.
범위를 미리 구해서 maxi까지로 되는 게 좋네요
classes.append(list(map(int, sys.stdin.readline().split()))) | ||
maxi = max(maxi, classes[-1][1]) | ||
|
||
classes.sort(reverse=True) |
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.
헉 이게 우선순위를 거꾸로 하겟다가 아니고 내림차순으로 정렬하겠다는 거였군요...똑똑한 파이썬
first = board[i][0] | ||
if first == '.': | ||
continue |
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.
설명하시는 도중에 오류 찾으시는 게 멋졌습니다🥹
for i in range(n): | ||
p, d = classes[i] | ||
|
||
for j in range(d, 0, -1): | ||
if visited[j] == 0: | ||
visited[j] = p | ||
break |
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.
큰 비용부터 시작해서 최대 날짜부터 visited
처리하는 풀이군요! 저랑 풀이가 달라서 보기 좋았슴다!
📌 from issue #276 📌
📋문제 목록📋