From 68665a87d19d5704f3f1fed54bb8f4da13e8bfaa Mon Sep 17 00:00:00 2001 From: seongwon030 <105052068+seongwon030@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:54:33 +0900 Subject: [PATCH 1/2] =?UTF-8?q?2024-08-10=20=EC=A3=BC=EC=82=AC=EC=9C=84?= =?UTF-8?q?=EA=B5=B4=EB=A6=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...04\352\265\264\353\246\254\352\270\260.py" | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 "seongwon030/\352\265\254\355\230\204/\354\243\274\354\202\254\354\234\204\352\265\264\353\246\254\352\270\260.py" diff --git "a/seongwon030/\352\265\254\355\230\204/\354\243\274\354\202\254\354\234\204\352\265\264\353\246\254\352\270\260.py" "b/seongwon030/\352\265\254\355\230\204/\354\243\274\354\202\254\354\234\204\352\265\264\353\246\254\352\270\260.py" new file mode 100644 index 0000000..1d97158 --- /dev/null +++ "b/seongwon030/\352\265\254\355\230\204/\354\243\274\354\202\254\354\234\204\352\265\264\353\246\254\352\270\260.py" @@ -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 \ No newline at end of file From 56c033b931230f36616e7b937c8f90ebffa7e265 Mon Sep 17 00:00:00 2001 From: seongwon030 <105052068+seongwon030@users.noreply.github.com> Date: Sat, 10 Aug 2024 17:54:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EB=A6=AC=EB=93=9C=EB=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seongwon030/README.md | 44 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/seongwon030/README.md b/seongwon030/README.md index 553b05e..001b8c0 100644 --- a/seongwon030/README.md +++ b/seongwon030/README.md @@ -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) | ---