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

[이지민] - CCW, 전구와 스위치, 케빈 베이컨의 6단계 법칙, 함께 블록 쌓기 #173

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

jeeminimini
Copy link
Member

📌 from issue #170 📌

📋문제 목록📋

케빈 베이컨의 6단계 법칙: ✅
CCW: ⛔️
전구와 스위치: ⛔️
함께 블록 쌓기: ⛔️

📍추가로 해결한 문제📍

📝메모

이번주 짱 어렵네요,,

@@ -0,0 +1,19 @@
'''
1도 모르겠습니다.
수학 다 까먹었습니다..
Copy link
Contributor

Choose a reason for hiding this comment

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

저두욧^^...

for i in range(0, n - 1):
if now_1[i] != after[i]:
num_1 += 1
now_1[i] = 1 - now_1[i]
Copy link
Contributor

Choose a reason for hiding this comment

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

1 - 값 좋네요

Comment on lines +14 to +19
for i in range(n):
for j in range(h + 1):
if dp[i][j]:
for s in students[i]:
if j + s <= h:
dp[i + 1][j + s] = (dp[i + 1][j + s] + dp[i][j]) % 10007
Copy link
Contributor

Choose a reason for hiding this comment

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

헉 여기 코드기 디게 깔꼼쓰 하네요👍

q = deque([n])
visited = [0 for _ in range(len(bacons) + 1)]
num = 1
while q:
Copy link
Contributor

Choose a reason for hiding this comment

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

이런게 너무 신기합ㄴ디ㅏ 파이썬,,,

Copy link
Member

@soopeach soopeach left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

@@ -0,0 +1,19 @@
'''
1도 모르겠습니다.
수학 다 까먹었습니다..
Copy link
Member

Choose a reason for hiding this comment

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

인정...

p2_x, p2_y = map(int, input().split())
p3_x, p3_y = map(int, input().split())

res = p1_x * p2_y + p2_x * p3_y + p3_x * p1_y - (p2_x * p1_y + p3_x * p2_y + p1_x * p3_y)
Copy link
Member

Choose a reason for hiding this comment

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

반복문 쓰는 것보다 이렇게 하는게 훨씬 깔끔하네요

for i in range(0, n - 1):
if now_1[i] != after[i]:
num_1 += 1
now_1[i] = 1 - now_1[i]
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
Contributor

Choose a reason for hiding this comment

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

헐 내껀데 뺏겼다,,,



n, m = map(int, input().split())
bacons = defaultdict(list)
Copy link
Member

Choose a reason for hiding this comment

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

새로운 거 알아갑니다..!!

if dp[i][j]:
for s in students[i]:
if j + s <= h:
dp[i + 1][j + s] = (dp[i + 1][j + s] + dp[i][j]) % 10007
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.

넵! 이게 더 연산이 빠를 것 같기두 하고요??

Comment on lines +1 to +3
'''
1도 모르겠습니다.
수학 다 까먹었습니다..
Copy link
Member

Choose a reason for hiding this comment

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

ㅋㅋㅋㅋㅋㅋ ㅠㅠ...

global bacons
q = deque([n])
visited = [0 for _ in range(len(bacons) + 1)]
num = 1
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.

오 그러네요 눈썰미 대박!!

now_1 = before[:]
num_1 = 0
for i in range(0, n - 1):
if now_1[i] != after[i]:
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 9fe7203 into main Sep 12, 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