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

11-wkdghdwns199 #47

Merged
merged 7 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wkdghdwns199/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
| 8μ°¨μ‹œ | 2024.02.23 | μŠ€νƒ, 큐, 덱 | <a href="https://www.acmicpc.net/problem/12789">도킀도킀 κ°„μ‹λ“œλ¦¬λ―Έ</a> | <a href="">2024.02.23</a> |
| 9μ°¨μ‹œ | 2024.02.26 | μŠ€νƒ, 큐, 덱 | <a href="https://www.acmicpc.net/problem/2346">풍선 ν„°λœ¨λ¦¬κΈ°</a> | <a href="">2024.02.26</a> |
| 10μ°¨μ‹œ | 2024.02.29 | μŠ€νƒ, 큐, 덱 | <a href="https://www.acmicpc.net/problem/18258">큐 2</a> | <a href="">2024.02.29</a> |

| 11μ°¨μ‹œ | 2024.03.03 | μŠ€νƒ, 큐, 덱 | <a href="https://www.acmicpc.net/problem/11866">μš”μ„Έν‘ΈμŠ€ 문제 0</a> | <a href="">2024.03.03</a> |
Empty file.
43 changes: 43 additions & 0 deletions wkdghdwns199/리뷰풀이/ACM-2630.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
white_color = 0
blue_color = 0

def divide(start_x, end_x, start_y, end_y) :
global white_color, blue_color
checking_color = paper[start_x][start_y]
sw=0
for index_x in range(start_x, end_x):
for index_y in range(start_y, end_y):
if paper[index_x][index_y] != checking_color :
sw=1
break
if sw==1 : break

if sw==0 :
if checking_color == 1 :
blue_color = blue_color +1
else :
white_color = white_color + 1
else :
divide(start_x, int((start_x + end_x)/2), start_y, int((start_y+end_y)/2))
divide(start_x, int((start_x+end_x)/2), int((start_y+end_y)/2), end_y)
divide(int((start_x+end_x)/2), end_x, start_y, int((start_y+ end_y)/2))
divide(int((start_x+end_x)/2), end_x, int((start_y+end_y)/2), end_y)
return


import sys
input = sys.stdin.readline



N = int(input())
paper = [list(map(int, input().split())) for _ in range(N)]

divide(0,N,0,N)


print(white_color)
print(blue_color)



12 changes: 12 additions & 0 deletions wkdghdwns199/μŠ€νƒ_큐_덱/ACM-11866.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys
from collections import deque
input = sys.stdin.readline

N, K= map(int, input().split())
circle_list = deque([number for number in range(1,N+1)])
print('<', end='')
while circle_list :
circle_list.rotate(-(K-1))
print(circle_list.popleft(), end='')
if len(circle_list) != 0 : print(', ', end='')
print('>')
11 changes: 11 additions & 0 deletions wkdghdwns199/μŠ€νƒ_큐_덱/ACM-2164.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sys
from collections import deque
input = sys.stdin.readline
N = int(input())
card_deck = deque([card for card in range(1,N+1)])

while len(card_deck) != 1 :
card_deck.popleft()
card_deck.rotate(-1)

print(card_deck[0])
23 changes: 23 additions & 0 deletions wkdghdwns199/μŠ€νƒ_큐_덱/ACM-28279.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import sys
from collections import deque
input = sys.stdin.readline
deq = deque()
N = int(input())
for _ in range(N) :
cmd = list(map(int, input().split()))
if cmd[0] == 1 :
deq.appendleft(cmd[1])
elif cmd[0] == 2 :
deq.append(cmd[1])
elif cmd[0] == 3 :
print(-1 if len(deq) == 0 else deq.popleft())
elif cmd[0] == 4 :
print(-1 if len(deq) == 0 else deq.pop())
elif cmd[0] == 5 :
print(len(deq))
elif cmd[0] == 6 :
print(1 if len(deq) == 0 else 0)
elif cmd[0] == 7 :
print(-1 if len(deq)==0 else deq[0])
elif cmd[0] == 8:
print(-1 if len(deq)==0 else deq[len(deq)-1])
Loading