-
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
[이지민] - 항체 인식, 토마토, 우체국, 문자열 게임 2 #224
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(26): | ||
if len(alphabet[i]) >= k: | ||
for j in range(0, len(alphabet[i]) - k + 1): | ||
mini = min(mini, alphabet[i][j + k - 1] - alphabet[i][j] + 1) | ||
maxi = max(maxi, alphabet[i][j + k - 1] - alphabet[i][j] + 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.
와 깔끔하군요,,,
for i in range(n): | ||
if abs(people - (total - people - town[i][1])) < mini: | ||
mini = abs(people - (total - people - town[i][1])) | ||
result = town[i][0] | ||
|
||
people += town[i][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.
직접 푸신게,,, 대단하십니다.
for i in range(4): | ||
if 0 <= nx + dx[i] < n and 0 <= ny + dy[i] < m: | ||
if tomato[nx + dx[i]][ny + dy[i]] == 0: | ||
queue.append([nx + dx[i], ny + dy[i]]) | ||
tomato[nx + dx[i]][ny + dy[i]] = tomato[nx][ny] + 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.
진짜 깔끔하네요
for i in range(len(w) - 1): | ||
alphabet[ord(w[i]) - ord('a')].append(i) | ||
|
||
mini = 10_001 |
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.
지미니미니 ㅎㅎ
mini = 1_000_000_000 * 100_000 | ||
result = -1 | ||
for i in range(n): | ||
if abs(people - (total - people - town[i][1])) < mini: |
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.
저도 제 식이 뭔지 이해가 안갔었는데 지민님 설명 듣고 이해가 됐습니다 ㅎㅎ
if after[nx][ny] != update: | ||
possible = -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.
헉..큐에 넣기 전에 before가 탐색중인 값인지도 조건에 추가하면 after가 다를때 바로 NO처리가 가능하군요...예외처리 댑악
if abs(people - (total - people - town[i][1])) < mini: | ||
mini = abs(people - (total - people - town[i][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.
저랑 구현을 다르게 하셔서 좋았습니다!
if result <= 1 : | ||
print("YES") |
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.
resturn 된 possible 의 합으로 처리하는 부분이 좋았습니다
📌 from issue #220 📌
📋문제 목록📋