Problem Solving/SWEA8 swea1865. ๋์ฒ ์ด์ ์ผ ๋ถ๋ฐฐ https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5LuHfqDz8DFAXc SW Expert Academy SW ํ๋ก๊ทธ๋๋ฐ ์ญ๋ ๊ฐํ์ ๋์์ด ๋๋ ๋ค์ํ ํ์ต ์ปจํ ์ธ ๋ฅผ ํ์ธํ์ธ์! swexpertacademy.com def DFS(per,level): global Max,N if Max>= per: #์๊ฐ์ด๊ณผ ๋์ ๋ฐฑํธ๋ํน return if level == N: if Max 2022. 6. 2. swea14190. ๋ฏผ์ฝ์จ์ ๊ฝ๋ฐญ(python) https://swexpertacademy.com/main/code/userProblem/userProblemDetail.do?contestProbId=AX_PdObKe04DFARi&categoryId=AX_PdObKe04DFARi&categoryType=CODE SW Expert Academy SW ํ๋ก๊ทธ๋๋ฐ ์ญ๋ ๊ฐํ์ ๋์์ด ๋๋ ๋ค์ํ ํ์ต ์ปจํ ์ธ ๋ฅผ ํ์ธํ์ธ์! swexpertacademy.com from collections import deque T = int(input()) for tc in range(1,T+1): row,col = map(int,input().split()) arr=[list(map(int,input().split())) for _ in range(row)] sy,sx=m.. 2022. 4. 11. swea4021.์๋ฆฌ์ฌ https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWIeUtVakTMDFAVH SW Expert Academy SW ํ๋ก๊ทธ๋๋ฐ ์ญ๋ ๊ฐํ์ ๋์์ด ๋๋ ๋ค์ํ ํ์ต ์ปจํ ์ธ ๋ฅผ ํ์ธํ์ธ์! swexpertacademy.com #์๋ฆฌ์ฌ T = int(input()) for tc in range(1,T+1): N= int(input()) arr = [list(map(int,input().split())) for _ in range(N)] answer = 999999999 #DFS๋ก ํ์ด์ผํ ๋ฏ.. #์๋ฆฌ 2๊ฐ๋๊น ์ฌ๋ฃ ๋๋๊ฒ. -๊ฐ์ ์์ฌ๋ฃ ์์ผ๋ ์๋ฅผ ๋น๊ต ํด์ผํจ! #level==N #DFS ์๋ฆฌA,์๋ฆฌB ๋๋ ์ ์ฌ๊ท (.. 2022. 4. 7. swea2117.ํ ๋ฐฉ๋ฒ ์๋น์ค SW Expert Academy SW ํ๋ก๊ทธ๋๋ฐ ์ญ๋ ๊ฐํ์ ๋์์ด ๋๋ ๋ค์ํ ํ์ต ์ปจํ ์ธ ๋ฅผ ํ์ธํ์ธ์! swexpertacademy.com T=int(input()) for tc in range(1,T+1): N,M=map(int,input().split()) arr=[list(map(int,input().split())) for _ in range(N)] cost = [0]+[K*K+(K-1)*(K-1) for K in range(1,40)] #cost์ ๋น์ฉ์ ๋ฏธ๋ฆฌ ๊ตฌํ๊ธฐ! (์ด์์์ญ(K)๋ณ ์ด์ ๋น์ฉ) def homesafer(): home =[] #์ง ์ขํ ๋ฃ์ด ์ค ๋ฆฌ์คํธ ans = 0 # ๋ต ๋ฃ์ด์ค ๋ณ์ #์ง ์ขํ ๊ตฌํ๊ธฐ for i in range(N): for j in range(N): i.. 2022. 4. 7. swea.14195 ๋ฏธ์๋ฌผ ๊ด์ฐฐ https://swexpertacademy.com/main/code/userProblem/userProblemDetail.do?contestProbId=AX_Pn1I6fBQDFARi SW Expert Academy SW ํ๋ก๊ทธ๋๋ฐ ์ญ๋ ๊ฐํ์ ๋์์ด ๋๋ ๋ค์ํ ํ์ต ์ปจํ ์ธ ๋ฅผ ํ์ธํ์ธ์! swexpertacademy.com from collections import deque T = int(input()) for tc in range(1,T+1): N,M = map(int,input().split()) arr=[list(input()) for _ in range(N)] a_visit = [[0]*M for _ in range(N)] b_visit = [[0]*M for _ in range(N)] a_cn.. 2022. 4. 6. swea. ์ ๊ธฐ๋ฒ์ค # k์์ ์ ๋ฅ์ฅ ์๋? - ํจ์ ๋ง๋ค๊ธฐ def drive(k,n,m): now = 0 next = k result = 0 while next < n: # ๋ค์ ์ ๋ฅ์ฅ < ์ต๋ ๊ฑฐ๋ฆฌ while bus[next] == 0: # ๋ฒ์ค์ ๋ฅ์ฅ์ด ์ถฉ์ ์๊ฐ ์๋ next-=1 # ๋ค๋ก ํ์นธ์ฉ if next == now: #๋ค๋ก ๊ฐ๋ค๊ฐ ํ์ฌ ์์น์ ๊ฐ์์ง๋ฉด return 0 # ์ข ์ ์ ๋์ฐฉ ๋ถ๊ฐ now = next next += k result += 1 # ์ต์ํ์ ์ถฉ์ ํ์ return result T = int(input()) for tc in range(1,T+1): # k ๋ ธ์ ์,n ์ต๋ํ ๊ฐ ์ ์๋ ๊ฑฐ๋ฆฌ, m ์ถฉ์ ์ k,n,m = map(int,input().split()) # ์ถฉ์ ์ ์์น charge = .. 2022. 3. 6. swea. min max T = int(input()) for i in range(0, T): U = int(input()) case_in = list(map(int, input().split())) case_max = max(case_in) case_min = min(case_in) case = case_max - case_min i += 1 print(f'#{i} {case}') 2022. 3. 6. swea.view ๋ฌธ์ ์ ์ ์๊ถ์ SWexpert(swea)์ ์์ต๋๋ค. T = 10 for tc in range(1, T+1): N = int(input()) arr = list(map(int, input().split())) view = 0 for i in range(2, N-2): # ์กฐ๋ง๊ถ์ ํ์ธํ๊ธฐ a = arr[i-2] if arr[i-2] > arr[i-1] else arr[i-1] b = arr[i+2] if arr[i+2] > arr[i+1] else arr[i+1] maxV = a if a>b else b if arr[i] > maxV: # ์กฐ๋ง๊ถ์ด ์์ view += arr[i] - maxV print(f'#{tc} {view}') 2022. 3. 6. ์ด์ 1 ๋ค์