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

24-seongwon030 #88

Merged
merged 2 commits into from
Aug 21, 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
44 changes: 26 additions & 18 deletions seongwon030/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
## โœ๏ธ ๊ธฐ๋ก

| ์ฐจ์‹œ | ๋‚ ์งœ | ๋ฌธ์ œ์œ ํ˜• | ๋งํฌ | ํ’€์ด |
| :----: | :--------: | :--------: | :-----------------------------------------------------: | :-------------------------------------------------------: |
| 1์ฐจ์‹œ | 2024.03.11 | ์Šคํƒ | [์‡ ๋ง‰๋Œ€๊ธฐ](https://www.acmicpc.net/problem/10799) | [#1](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/2) |
| 2์ฐจ์‹œ | 2024.03.16 | BFS | [ํ† ๋งˆํ† ](https://www.acmicpc.net/problem/7576) | [#2](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/7) |
| 3์ฐจ์‹œ | 2024.03.19 | BFS | [3์ฐจ์›ํ† ๋งˆํ† ](https://www.acmicpc.net/problem/7569) | [#3](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/11) |
| 4์ฐจ์‹œ | 2024.03.25 | BFS | [์ˆจ๋ฐ”๊ผญ์งˆ3](https://www.acmicpc.net/problem/13549) | [#4](https://github.com/AlgoLeadMe/AlgoLeadMe8/pull/16) |
| 5์ฐจ์‹œ | 2024.03.30 | BFS | [์ ํ”„์ ํ”„](https://www.acmicpc.net/problem/11060) | [#5](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/23) |
| 6์ฐจ์‹œ | 2024.04.02 | ์Šคํƒ | [๋ฌธ์ž์—ดํญ๋ฐœ](https://www.acmicpc.net/problem/9935) | [#6](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/25) |
| 7์ฐจ์‹œ | 2024.04.05 | ์Šคํƒ | [์˜คํฐ์ˆ˜](https://www.acmicpc.net/problem/17298) | [#7](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/30) |
| 8์ฐจ์‹œ | 2024.04.12 | BFS | [๊ฒฐํ˜ผ์‹](https://www.acmicpc.net/problem/5567) | [#8](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/37) |
| 9์ฐจ์‹œ | 2024.04.29 | DP | [1,2,3 ๋”ํ•˜๊ธฐ 3](https://www.acmicpc.net/problem/15988) | [#9](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/38) |
| 10์ฐจ์‹œ | 2024.05.07 | ์ˆ˜ํ•™ | [์—ฐ์† ํ•ฉ](https://www.acmicpc.net/problem/2737) | [#10](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/43) |
| 11์ฐจ์‹œ | 2024.05.07 | DP | [ํ•ฉ๋ถ„ํ•ด](https://www.acmicpc.net/problem/2225) | [#11](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/44) |
| 12์ฐจ์‹œ | 2024.05.13 | ๋ธŒ๋ฃจํŠธํฌ์Šค | [์•”ํ˜ธ๋งŒ๋“ค๊ธฐ](https://www.acmicpc.net/problem/1759) | [#12](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/50) |
| 13์ฐจ์‹œ | 2024.05.23 | ๋ถ„ํ• ์ •๋ณต | [ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜ 6](https://www.acmicpc.net/problem/11444) | [#13](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/55) |
| 14์ฐจ์‹œ | 2024.05.28 | ํ | [๊ฐ€์šด๋ฐ๋ฅผ ๋งํ•ด์š”](https://www.acmicpc.net/problem/1655) | [#14](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/58) |
| 15์ฐจ์‹œ | 2024.06.01 | ํ | [์ค‘์•™๊ฐ’ ๊ตฌํ•˜๊ธฐ](https://www.acmicpc.net/problem/2696) | [#15](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/61) |
| 16์ฐจ์‹œ | 2024.07.04 | DP | [์—ฐ์†ํ•ฉ](https://www.acmicpc.net/problem/1912) | [#16](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/66) |
| ์ฐจ์‹œ | ๋‚ ์งœ | ๋ฌธ์ œ์œ ํ˜• | ๋งํฌ | ํ’€์ด |
| :----: | :--------: | :------------: | :-----------------------------------------------------: | :-------------------------------------------------------: |
| 1์ฐจ์‹œ | 2024.03.11 | ์Šคํƒ | [์‡ ๋ง‰๋Œ€๊ธฐ](https://www.acmicpc.net/problem/10799) | [#1](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/2) |
| 2์ฐจ์‹œ | 2024.03.16 | BFS | [ํ† ๋งˆํ† ](https://www.acmicpc.net/problem/7576) | [#2](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/7) |
| 3์ฐจ์‹œ | 2024.03.19 | BFS | [3์ฐจ์›ํ† ๋งˆํ† ](https://www.acmicpc.net/problem/7569) | [#3](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/11) |
| 4์ฐจ์‹œ | 2024.03.25 | BFS | [์ˆจ๋ฐ”๊ผญ์งˆ3](https://www.acmicpc.net/problem/13549) | [#4](https://github.com/AlgoLeadMe/AlgoLeadMe8/pull/16) |
| 5์ฐจ์‹œ | 2024.03.30 | BFS | [์ ํ”„์ ํ”„](https://www.acmicpc.net/problem/11060) | [#5](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/23) |
| 6์ฐจ์‹œ | 2024.04.02 | ์Šคํƒ | [๋ฌธ์ž์—ดํญ๋ฐœ](https://www.acmicpc.net/problem/9935) | [#6](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/25) |
| 7์ฐจ์‹œ | 2024.04.05 | ์Šคํƒ | [์˜คํฐ์ˆ˜](https://www.acmicpc.net/problem/17298) | [#7](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/30) |
| 8์ฐจ์‹œ | 2024.04.12 | BFS | [๊ฒฐํ˜ผ์‹](https://www.acmicpc.net/problem/5567) | [#8](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/37) |
| 9์ฐจ์‹œ | 2024.04.29 | DP | [1,2,3 ๋”ํ•˜๊ธฐ 3](https://www.acmicpc.net/problem/15988) | [#9](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/38) |
| 10์ฐจ์‹œ | 2024.05.07 | ์ˆ˜ํ•™ | [์—ฐ์† ํ•ฉ](https://www.acmicpc.net/problem/2737) | [#10](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/43) |
| 11์ฐจ์‹œ | 2024.05.07 | DP | [ํ•ฉ๋ถ„ํ•ด](https://www.acmicpc.net/problem/2225) | [#11](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/44) |
| 12์ฐจ์‹œ | 2024.05.13 | ๋ธŒ๋ฃจํŠธํฌ์Šค | [์•”ํ˜ธ๋งŒ๋“ค๊ธฐ](https://www.acmicpc.net/problem/1759) | [#12](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/50) |
| 13์ฐจ์‹œ | 2024.05.23 | ๋ถ„ํ• ์ •๋ณต | [ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜ 6](https://www.acmicpc.net/problem/11444) | [#13](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/55) |
| 14์ฐจ์‹œ | 2024.05.28 | ํ | [๊ฐ€์šด๋ฐ๋ฅผ ๋งํ•ด์š”](https://www.acmicpc.net/problem/1655) | [#14](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/58) |
| 15์ฐจ์‹œ | 2024.06.01 | ํ | [์ค‘์•™๊ฐ’ ๊ตฌํ•˜๊ธฐ](https://www.acmicpc.net/problem/2696) | [#15](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/61) |
| 16์ฐจ์‹œ | 2024.07.04 | DP | [์—ฐ์†ํ•ฉ](https://www.acmicpc.net/problem/1912) | [#16](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/66) |
| 17์ฐจ์‹œ | 2024.07.05 | ์ตœ์†Œ์ŠคํŒจ๋‹ํŠธ๋ฆฌ | [์ตœ์†Œ์ŠคํŒจ๋‹ํŠธ๋ฆฌ](https://www.acmicpc.net/problem/1197) | [#17](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/67) |
| 18์ฐจ์‹œ | 2024.07.08 | ์ตœ์†Œ์ŠคํŒจ๋‹ํŠธ๋ฆฌ | [์ •๋ณต์ž](https://www.acmicpc.net/problem/14950) | [#18](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/69) |
| 19์ฐจ์‹œ | 2024.07.14 | ์ตœ์†Œ์ŠคํŒจ๋‹ํŠธ๋ฆฌ | [์ „๋ ฅ๋‚œ](https://www.acmicpc.net/problem/6497) | [#19](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/73) |
| 20์ฐจ์‹œ | 2024.07.22 | ์œ ๋‹ˆ์˜จํŒŒ์ธ๋“œ | [์ง‘ํ•ฉ์˜ํ‘œํ˜„ ](https://www.acmicpc.net/problem/1717) | [#20](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/76) |
| 21์ฐจ์‹œ | 2024.07.24 | DFS | [ํŠธ๋ฆฌ](https://www.acmicpc.net/problem/1068) | [#21](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/78) |
| 22์ฐจ์‹œ | 2024.07.30 | DFS | [์•ŒํŒŒ๋ฒณ](https://www.acmicpc.net/problem/1987) | [#22](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/80) |
| 23์ฐจ์‹œ | 2024.08.05 | DFS | [๊ฒŒ์ž„](https://www.acmicpc.net/problem/1103) | [#23](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/85) |
| 24์ฐจ์‹œ | 2024.08.10 | ๊ตฌํ˜„ | [์ฃผ์‚ฌ์œ„๊ตด๋ฆฌ๊ธฐ](https://www.acmicpc.net/problem/14499) | [#24](https://github.com/AlgoLeadMe/AlgoLeadMe-8/pull/66) |

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import sys
input = sys.stdin.readline

n,m,x,y,k = map(int,input().split())
arr = []
for _ in range(n):
arr.append(list(map(int,input().split())))

move = list(map(int,input().split()))

# ์ฃผ์‚ฌ์œ„ (์„œ,๋ถ,์œ—๋ฉด,์˜ค,๋‚จ,์•„๋žซ๋ฉด) ์ดˆ๊ธฐ๊ฐ’
dice = [0]*6
# k=1, ๋™์ชฝ์œผ๋กœ ์ด๋™
# k=2, ์„œ์ชฝ์œผ๋กœ ์ด๋™
# k=3, ๋ถ์ชฝ์œผ๋กœ ์ด๋™
# k=4, ๋‚จ์ชฝ์œผ๋กœ ์ด๋™

for i in move:
if i == 1: # ๋™
if y+1 < m:
y+=1
dice[0],dice[2],dice[3],dice[5] = dice[5],dice[0],dice[2],dice[3]
print(dice[2])
if arr[x][y] == 0:
arr[x][y] = dice[5]
else:
dice[5] = arr[x][y]
arr[x][y] = 0
elif i == 2: # ์„œ
if y-1 >=0:
y-=1
dice[0],dice[2],dice[3],dice[5] = dice[2],dice[3],dice[5],dice[0]
print(dice[2])
if arr[x][y] == 0:
arr[x][y] = dice[5]
else:
dice[5] = arr[x][y]
arr[x][y] = 0
elif i == 3: # ๋ถ
if x-1 >=0:
x-=1
dice[1],dice[2],dice[4],dice[5] = dice[2],dice[4],dice[5],dice[1]
print(dice[2])
if arr[x][y] == 0:
arr[x][y] = dice[5]
else:
dice[5] = arr[x][y]
arr[x][y] = 0
elif i == 4: # ๋‚จ
if x+1 < n:
x+=1
dice[1],dice[2],dice[4],dice[5] = dice[5],dice[1],dice[2],dice[4]
print(dice[2])
if arr[x][y] == 0:
arr[x][y] = dice[5]
else:
dice[5] = arr[x][y]
arr[x][y] = 0