일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 오버라이딩
- 오블완
- 싱글톤
- objecterror
- 의존관계
- @configuration
- HttpServletResponse
- 티스토리챌린지
- 테스트코드
- 김영한
- equals()
- 다익스트라
- 추상클래스
- 서블릿
- 프로그래머스
- 인터페이스
- 프록시
- DI
- 스프링
- 참조변수
- 코딩테스트
- java
- fielderror
- html form
- 코드트리조별과제
- 스프링컨테이너
- 코드트리
- 백준
- 예외와 트랜잭션 커밋
- http 메시지 컨버터
- Today
- Total
목록Problem Solving (19)
minOS
https://school.programmers.co.kr/learn/courses/30/lessons/12927 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr import heapqdef solution(n, works): ans = 0 if sum(works) 0: negative, positive = heapq.heappop(pq) if positive > 0: negative += 1 positive -= 1 n -= 1 heapq.heappush(pq,(negative,positive))..
https://www.acmicpc.net/problem/1719 import sysimport heapqINF = sys.maxsizen,m = map(int,input().split())graph = [[] for _ in range(n+1)]for _ in range(m): a,b,time = map(int,input().split()) graph[a].append((time,b)) graph[b].append((time,a))def dijkstra(start): dist[start] =0 heapq.heappush(pq,(0,start)) while pq : min_dist,min_node = heapq.heappop(pq) ..
https://school.programmers.co.kr/learn/courses/30/lessons/258712 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr def solution(friends, gifts): n = len(friends) d = dict() d = {friends[i]: i for i in range(n)} ans = {i : 0 for i in range(n)} array = [[0 for _ in range(n)] for _ in range(n)] for gift in gifts: arr = gift.split() array[..
https://school.programmers.co.kr/learn/courses/30/lessons/12980 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 처음에 BFS 풀었다가 효율성에서 막혔다 from collections import dequedef solution(n): q= deque() visited = [0 for _ in range(n+1)] q.append((1,1)) visited[1] =1 while q : x,step = q.popleft() if x == n : return step ..
https://www.acmicpc.net/problem/5567문제를 보고 상근이의 친구와 그 친구의 친구를 찾아야하니깐 상근이와 거리가 1,2 인 사람들을 찾아야겠다고 생각하였습니다.상근이 학번은 1 이므로 처음 큐에 1을 넣고 시작하고, 그래프를 통해 방문 가능한 (아직 방문하지 않은)친구들과의 거리를 계산하고 큐에 새로운 친구들을 넣어줍니다. 이러한 과정을 큐에 아무런 원소도 없을때까지 반복하면 visited 배열에 상근이와 친구들의 거리를 알 수 있습니다. 저는 상근이를 방문했다는 의미로 visited[1] =1 이기 때문에 visited 배열이 2와 3 사이인 경우를 세주면 답이 나옵니다.from collections import dequen = int(input())m = int(input(..
https://www.acmicpc.net/problem/2941문제를 보고 .. dž 변경만 3자리고 나머지는 두자리라는 것이 눈에 들어와서 알파벳 검사를 3자리와 2자리 그리고 나머지로 나누면 개수가 나올 것 이라고 생각하였습니다.word = input()string = {"c=", "c-","d-", "lj","nj","s=","z="}ans =0idx =0while idx != len(word): if word[idx:idx+3] == "dz=": ans+=1 idx += 3 elif word[idx:idx+2] in string: ans+=1 idx+=2 else: idx+=1 ans+=1print(ans..