일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- dfs
- SQL
- Lv. 3
- SQL 고득점 KIT
- 자바스크립트
- Python
- LEVEL 2
- 오블완
- Lv. 1
- DP
- 티스토리챌린지
- group by
- 소프티어
- 너비 우선 탐색
- Java
- join
- bfs
- Baekjoon
- Lv. 0
- programmers
- 파이썬
- level 3
- javascript
- 백준
- Lv. 2
- 프로그래머스
- 깊이 우선 탐색
- select
- Dynamic Programming
- softeer
- Today
- Total
목록백트래킹 (6)
몸과 마음이 건전한 SW 개발자

문제 링크https://www.acmicpc.net/problem/15684내 코드import sysinput = sys.stdin.readlinen, m, h = map(int, input().split())board = [[0] * (n+1) for _ in range(h+1)]for _ in range(m): row, column = map(int, input().split()) board[row][column] = column + 1 board[row][column+1] = columndef check(board, destination): c = destination for r in range(1, h+1): if board[r][c]: ..

https://school.programmers.co.kr/learn/courses/30/lessons/148653 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드answer = 72def solution(storey): def dfs(s, tot): global answer if answer 풀이 방법answer를 72로 둔 이유는 최악의 수가 99_999_999를 전부 9번씩 눌러서 9 * 8 = 72번 버튼을 누르는 것이다.경우의 수는 2개로 봤다.현재 가장 큰 자리수의 개수 만큼 누르기987인 경우 => 987 - 900 = 8710 ** 현재 자릿수에서 현..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/250134 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드answer = 16def solution(maze): n = len(maze) m = len(maze[0]) dr = [-1, 1, 0, 0] dc = [0, 0, -1, 1] def isValid(nr, nc): return 0 answer: return # 둘 다 도달했으면 if bf..

문제 링크 https://softeer.ai/practice/6277 Softeer - 현대자동차그룹 SW인재확보플랫폼 현대자동차그룹에 입사한 당신은 레이더 기술을 활용해 차량 주변의 장애물과 사물을 인식하는 프로그램을 만드는 업무를 담당하고 있다. 당신은 다양한 입력 값들로 인식된 사물에 대해 최소 softeer.ai 정답 코드 import sys sys.setrecursionlimit(10**9) input = sys.stdin.readline N, K = map(int, input().split()) def newDfs(S, maxX, minX, maxY, minY): global minSize if S == K+1: nowSize = (maxX - minX) * (maxY - minY) if no..
2022 KAKAO BLIND RECRUITMENT 코딩테스트 연습 | 프로그래머스 스쿨 개발자 취업의 필수 관문 코딩테스트를 철저하게 연습하고 대비할 수 있는 문제를 총망라! 프로그래머스에서 선발한 문제로 유형을 파악하고 실력을 업그레이드해 보세요! school.programmers.co.kr 정답 코드 win = [1 for _ in range(11)] app = [] maxScore = 0 maxV = [0 for _ in range(11)] def comparison(V, tmp): r = 0 a = 0 for i in range(11): if app[i] < tmp[i]: r += 10 - i elif app[i] != 0: a += 10 - i return r - a def dfs(S, cnt..
문제 링크 : https://school.programmers.co.kr/learn/challenges?order=acceptance_desc&partIds=37527 코딩테스트 연습 | 프로그래머스 스쿨 개발자 취업의 필수 관문 코딩테스트를 철저하게 연습하고 대비할 수 있는 문제를 총망라! 프로그래머스에서 선발한 문제로 유형을 파악하고 실력을 업그레이드해 보세요! school.programmers.co.kr 정답 코드 import sys sys.setrecursionlimit(10**9) result = "z" def solution(n, m, x, y, r, c, k): dist = abs(x - r) + abs(y - c) if dist > k or (k - dist) % 2 == 1: return..