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

문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/388352 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr정답 코드function solution(n, q, ans) { const lenQ = q.length; let answer = 0; for (let i = 1; i 풀이 방법dfs로 만들다가 실패해서 5중 for문으로 만들었다.조합을 만들어서 q의 요소들과 비교한다.ans와 같은 값이 나오면 answer++이후 answer를 출력하면 끝!느낀점사실 dfs를 사용해야 더 깔끔한 풀이가 될 수 있지만 결국 가장 직관적이고..

문제 링크https://www.acmicpc.net/problem/10830정답 코드import sysinput = sys.stdin.readlinen, b = map(int, input().split())matrix = [list(map(int, input().split())) for _ in range(n)]optimization = dict()# matrix의 원소가 1000이하이기 때문에 처음부터 걸러준다.for i in range(n): for j in range(n): matrix[i][j] %= 1000optimization[1] = matrix# cal = calculationdef cal(leftM, rightM): newM = [[0] * n for _ in ra..

문제 링크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://www.codetree.ai/trails/complete/curated-cards/challenge-group-same-word/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai정답 코드import sysinput = sys.stdin.readlinen = int(input())words = ..

문제 링크https://www.codetree.ai/trails/complete/curated-cards/challenge-the-sum-of-the-elements-is-0/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai내 코드n = int(input())A = list(map(int, input().split(..

문제 링크https://www.codetree.ai/trails/complete/curated-cards/challenge-sum-of-three-num/description Code Tree | Learning to Code with ConfidenceA super-comprehensive, meticulously arranged Coding Learning Curriculum engineered by Algorithm Experts composed of former International Olympiad in Informatics (IOI) medalists.www.codetree.ai내 코드n, k = map(int, input().split())arr = list(map(int, input()...