일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- 파이썬
- 문자열
- SQL 고득점 KIT
- 깊이 우선 탐색
- 스택
- 프로그래머스
- Stack
- Lv. 2
- 다이나믹프로그래밍
- group by
- Lv. 1
- bfs
- 메모이제이션
- Lv. 0
- Python
- Java
- programmers
- 자바스크립트
- C언어
- Lv. 3
- 브루트포스
- level3
- Dynamic Programming
- softeer
- dfs
- javascript
- 소프티어
- DP
- level 3
- 너비 우선 탐색
- Today
- Total
목록파이썬 (100)
몸과 마음이 건전한 SW 개발자
문제 링크 https://www.acmicpc.net/problem/21611 21611번: 마법사 상어와 블리자드 마법사 상어는 파이어볼, 토네이도, 파이어스톰, 물복사버그, 비바라기 마법을 할 수 있다. 오늘 새로 배운 마법은 블리자드이고, 크기가 N×N인 격자에서 연습하려고 한다. N은 항상 홀수이고, ( www.acmicpc.net 정답 코드 import sys input = sys.stdin.readline N, M = map(int, input().split()) blizzard = [list(map(int, input().split())) for _ in range(N)] useMagics = [list(map(int, input().split())) for _ in range(M)] # 처..
문제 링크 https://www.acmicpc.net/problem/20057 20057번: 마법사 상어와 토네이도 마법사 상어가 토네이도를 배웠고, 오늘은 토네이도를 크기가 N×N인 격자로 나누어진 모래밭에서 연습하려고 한다. 위치 (r, c)는 격자의 r행 c열을 의미하고, A[r][c]는 (r, c)에 있는 모래의 양을 www.acmicpc.net 정답 코드 import sys input = sys.stdin.readline # 토네이도 방향에 따른 비율 tornadoDirections = { "L": { "dr": 0, "dc": -1, "list": [(0, -2, 0.05), (-1, -1, 0.1), (1, -1, 0.1), (-1, 0, 0.07), (1, 0, 0.07), (-2, 0, ..
문제 링크 https://school.programmers.co.kr/learn/courses/30/lessons/84512 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 코드 cnt = 0 answer = 0 def solution(word): def dictSearch(length, string): global cnt, answer if length: if word == string: answer = cnt if length == 5: return for alpha in ["A", "E", "I", "O", "U"]: cnt += 1 dictSe..
문제 링크 https://softeer.ai/practice/7703 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 정답 코드 import sys input = sys.stdin.readline result = [] N = int(input()) for _ in range(N): left, right = input().split() # 앞 뒤에서 동시에 탐색 # 앞 탐색 lenLeft = len(left) for idx in range(lenLeft): if left[idx] in ("x", "X"): result.append(right[idx].upper()) break if left[lenLeft-idx-1] in ("x", "X"): result.append(right[len..
문제 링크 https://softeer.ai/practice/6257 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 정답 코드 import sys input = sys.stdin.readline N = int(input()) busStation = list(map(int, input().split())) result = 0 for idx in range(N-1): valueIdx = busStation[idx] isNotPossible = 0 for jdx in range(idx+1, N): valueJdx = busStation[jdx] if valueIdx < valueJdx: isNotPossible += 1 else: result += isNotPossible print(r..
문제 링크 https://softeer.ai/practice/6258 Softeer - 현대자동차그룹 SW인재확보플랫폼 softeer.ai 정답 코드 import sys sys.setrecursionlimit(10**6) input = sys.stdin.readline nodeDict = dict() N = int(input()) adjL = [[] for _ in range(N+1)] for _ in range(N-1): start, to, distance = map(int, input().split()) adjL[start].append(to) adjL[to].append(start) nodeDict[(start, to)] = distance nodeDict[(to, start)] = distance..