일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 딥러닝
- 큐
- 구현
- 99클럽
- BFS
- boj 2309
- Python
- 스택
- 기능개발
- 항해99
- 혁펜하임
- 개발자취업
- til
- python 2309
- 백준
- easy 딥러닝
- 99항해
- 해시
- 파이썬
- 프로그래머스
- BOJ
- softeer
- 개발자 취업
- 코딩테스트 준비
- 활성화 함수
- 코딩테스트준비
- 알고리즘
- leetcode
- 백준 2309
- dfs
- Today
- Total
목록문제 풀이 (92)
동까의 코딩
https://school.programmers.co.kr/learn/courses/30/lessons/64064 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr itertools의 permutations를 사용해서 모든 경우의 수를 만들어주면서 풀이하였습니다. def solution(user_id, banned_id): answer=0 import re from itertools import permutations answers = [] for p in permutations(user_id, len(banned_id)): cnt = 0 for i in..
https://www.acmicpc.net/problem/1738 벨만포드 알고리즘에 대해 더 깊게 이해해야될 것 같다.....아직도 모르는 게 많은 것 같다. import sysINF= sys.maxsizedef bellman(start): global n distance = [-INF]*(n+1) distance[start]=0 route= [0]*(n+1) result=[] for i in range(n): for cur_node in range(1, n+1): if distance[cur_node]==-INF: continue for next_node, next_cost in graph[cur_node]: if distance[next..
https://www.acmicpc.net/problem/1022 달팽이판 구현을 위한 구글링을 하고 관련 기법에 대해 배우게 되었습니다. r1, c1, r2, c2 = map(int, input().split())arr = [[0] * (c2 - c1 + 1) for _ in range(r2 - r1 + 1)]max_num = 0def cal(r, c): bor = max(abs(r), abs(c)) default = (bor * 2 - 1) ** 2 + 1 if r == bor: return default + bor * 7 + c - 1 if c == -bor: return default + bor * 5 + r - 1 if r == -bor: ..
https://www.acmicpc.net/problem/9663 def N_queen(k): global n, cnt if k == n : cnt += 1 return for i in range(n): if not used_c[i] and not used_up[k+i] and not used_down[(n-1)+k-i]: used_c[i] = True used_up[k+i] = True used_down[(n-1)+k-i] = True N_queen(k+1) used_c[i] = False used_up[k+i] = F..
벨만 포드에 대한 이해도가 없어서 주말동안 공부해서 다시 풀어보겠습니다. https://www.acmicpc.net/problem/13317 #include using namespace std;int main() { ios::sync_with_stdio(0); cin.tie(0); cout 0; i--) cout https://measurezero.tistory.com/419 [BOJ 13317 // C++] 한 번 남았다※ 글쓴이는 취미로 코딩을 익혀보는 사람이라 정확하지 않은 내용을 담고 있을 수 있다 ※ 이번에 볼 문제는 백준 13317번 문제인 한 번 남았다이다. 문제는 아래 링크를 확인하자. https://www.acmicpmeasurezero.tistory.com해당 블로그를 참고해서 코드..
https://www.acmicpc.net/problem/2179 정렬 알고리즘 문제를 풀어보았습니다. n = int(input())a = [input() for _ in range(n)]b = sorted(list(enumerate(a)),key = lambda x: x[1])def check(a, b): cnt = 0 for i in range(min(len(a), len(b))): if a[i] == b[i]: cnt += 1 else: break return cntlength = [0] * (n+1)maxlength = 0for i in range(n-1): tmp = check(b[i][1], b[i+1][1]) maxlength..
https://school.programmers.co.kr/learn/courses/30/lessons/92343 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr def solution(info, edges): answer = [] visited = [False] * len(info) def dfs(sheeps, wolves): if sheeps > wolves: answer.append(sheeps) else: return for i, j in edges: ..
https://www.acmicpc.net/problem/1504 최단경로를 푸는 문제이고, 최단경로 코드를 참고하였습니다. 내일 또 다시 풀어볼 예정입니다. import heapqimport sysinput = sys.stdin.readlineINF = int(1e9)v, e = map(int, input().split())graph = [[] for _ in range(v + 1)]for _ in range(e): x, y, cost = map(int, input().split()) graph[x].append((y, cost)) graph[y].append((x, cost))def dijkstra(start): distance = [INF] * (v + 1) q = [] ..