일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 알고리즘
- 백준
- til
- 99클럽
- python 2309
- BOJ
- boj 2309
- dfs
- BFS
- 스택
- 프로그래머스
- 해시
- softeer
- 코딩테스트준비
- Python
- 파이썬
- 혁펜하임
- 항해99
- 백준 2309
- 딥러닝
- leetcode
- 큐
- 99항해
- easy 딥러닝
- 활성화 함수
- 코딩테스트 준비
- 구현
- 개발자취업
- 기능개발
- 개발자 취업
- Today
- Total
목록2025/01 (8)
동까의 코딩
벨만 포드에 대한 이해도가 없어서 주말동안 공부해서 다시 풀어보겠습니다. 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 = [] ..
https://www.acmicpc.net/problem/1253 시간복잡도가 중요한 문제이기 때문에 투포인터로 문제를 풀이했다. import sysinput = sys.stdin.readlinen = int(input())arr = list(map(int, input().split()))arr.sort()cnt = 0for i in range(n): end = arr[i] start = 0 tail = len(arr) - 1 while start end: tail -= 1 elif arr[start] + arr[tail]
https://www.acmicpc.net/problem/2211 import sys,heapqinput=sys.stdin.readlineINF=int(1e9)def move(): dp[1]=0 heap=[] ; heapq.heappush(heap , (0,1)) while heap: value,node=heapq.heappop(heap) if dp[node] 다익스트라 알고리즘을 사용한 풀이를 참조했고, 모르고 있던 알고리즘이라 공부를 해보았습니다.오늘의 문제가 나오기 전에 또 풀어볼 예정입니다.
https://school.programmers.co.kr/learn/courses/30/lessons/60060?language=python3 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr def solution(words, queries): answer = [] for st in queries: cnt = 0 start = 0 end = len(st) if st[0] == '?': for j in range(len(st)): if st[j] != '?': ..

https://www.acmicpc.net/problem/11657 import sysinput = sys.stdin.readlineINF = int(1e9)def bellman_ford(start): dist[start] = 0 for i in range(1, n + 1): for j in range(m): now, next, cost = edges[j][0], edges[j][1], edges[j][2] if dist[now] != INF and dist[next] > dist[now] + cost: dist[next] = dist[now] + cost if i == n: ..