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

[이지민] - 겹치는 건 싫어, 기타리스트, 회전초밥, 쉬운 최단거리 #166

Merged
merged 4 commits into from
Sep 3, 2023

Conversation

jeeminimini
Copy link
Member

📌 from issue #165 📌

📋문제 목록📋

겹치는 건 싫어: ⛔️
기타리스트: ⛔️
회전초밥: ✅
쉬운 최단거리: ✅

@jeeminimini jeeminimini self-assigned this Sep 3, 2023

while start < n and end < n:
if nums_info[nums[start]] < k:
nums_info[nums[start]] += 1
Copy link
Member

Choose a reason for hiding this comment

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

파이썬은 ++이 안되는게 흠이네요ㅜㅜ

Comment on lines +3 to +4
재귀의 경우 2^(n + 1) - 2의 시간이 걸린다.
하지만 dp 테이블을 만들경우 n * m 으로 50,000만 걸린다!
Copy link
Member

Choose a reason for hiding this comment

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

시간복잡도 설명 👍👍

queue.append([x, y])

while queue:
nx, ny = queue.popleft()
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
Member Author

Choose a reason for hiding this comment

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

있어요! 근데 보통 deque 쓰는 것 같더라고요

https://khu98.tistory.com/187 보고 깨달았다.
'''

n, k = map(int, input().split())
Copy link
Contributor

Choose a reason for hiding this comment

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

n, k = 으로 받는 거 코틀린만 되는 줄 알았는데...

Comment on lines +15 to +19
for i in range(4):
if 0 <= nx + dx[i] < n and 0 <= ny + dy[i] < m:
if ground[nx + dx[i]][ny + dy[i]] == 1 and result[nx + dx[i]][ny + dy[i]] == -1:
result[nx + dx[i]][ny + dy[i]] = result[nx][ny] + 1
queue.append([nx + dx[i], ny + dy[i]])
Copy link
Contributor

Choose a reason for hiding this comment

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

헉..이부분 디게 깔끔하네요👍👍 한 수 배우고 갑니다..

sushi.append(int(input()))

maxi = 0
sushi += sushi[:3000]
Copy link
Contributor

Choose a reason for hiding this comment

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

헉..아까 설명해주셨던 거 같은데 혹시 원래 sushi가 3000보다 작은 크기였다면 어떻게 되나요..?

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
Member Author

Choose a reason for hiding this comment

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

어 그러게요?ㅋㅋㅋㅋㅋ
근데 python은 크기가 커도 안터지는 것 같아요

sushi.append(int(input()))

maxi = 0
sushi += sushi[:3000]
Copy link
Member

Choose a reason for hiding this comment

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

저도 궁금쓰!

@jeeminimini jeeminimini merged commit 0a1046a into main Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants