일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 피보나치수열
- 오픽공부법
- ㅂ
- 오픽가격
- 메모이제이션
- 이진탐색
- XML주석
- 오픽노잼
- 탑다운
- XML
- 이진탐색 #나무 자르기
- opic
- 디피
- fibo
- 오픽
- English
- dp
- 다이나믹프로그래밍
- 영어말하기
- dynamicProgramming
- 오픽점수잘받는방법
- 오픽노잼공부방법
- 바텀업
- topdown
- 주석
- 안드로이드주석
- 영어회화
- 안드로이드
- stack 스택
목록전체 글 (298)
RUBY
출처:: programmers.co.kr/learn/courses/30/lessons/12940 분류:: 유클리드 호제법 1. 문제 이해 및 해결과정 hiruby.tistory.com/498 hiruby.tistory.com/503 2. 풀이방법 1. [ python ] def solution(n, m): answer = [] a,b=n,m while n!=0: n,m=m%n,n #나머지, 나누는 수 answer.append(m) #최대공약수 answer.append(a*b//m) #최소공배수 return answer 3. 오답원인 4. 알게된 점
출처:: https://www.acmicpc.net/problem/18405 분류:: bfs 1. 문제 이해 및 해결과정 - 바이러스가 낮은 번호부터 증식한다 ->큐에 낮은 바이러스 번호부터 넣어야한다. 2. 풀이방법 1. [ python ] bfs #경쟁적 전염 #https://www.acmicpc.net/problem/18405 import sys from collections import deque sys.stdin = open("input.txt","r") input=sys.stdin.readline n,k=map(int,input().split()) board=[list(map(int,input().split())) for i in range(n)] virus=[] #바이러스에 대한 정보 dh=..
출처:: https://www.acmicpc.net/problem/11866 분류:: 큐 1. 문제 이해 및 해결과정 2. 풀이방법 1. [ python ] 큐 #요세푸스 문제 0 #https://www.acmicpc.net/problem/11866 import sys from collections import deque sys.stdin = open("input.txt","r") n,k=map(int,input().split()) q=deque(i for i in range(1,n+1)) res=[] while q: q.rotate(-(k-1)) res.append(q.popleft()) i=1 cnt=0 print("" %res[i]) else: print("%d, " %res[i],end='') 3..
출처:: https://www.acmicpc.net/problem/2164 분류:: 큐 1. 문제 이해 및 해결과정 2. 풀이방법 1. [ python ] 큐 #카드2 #https://www.acmicpc.net/problem/2164 import sys from collections import deque sys.stdin = open("input.txt","r") n=int(input()) q=deque() for i in range(1,n+1): q.append(i) while len(q)>1: q.popleft() card=q.popleft() q.append(card) print(q.pop()) 3. 오답원인 4. 알게된 점

출처:: https://www.acmicpc.net/problem/1068 분류:: dfs, 트리 1. 문제 이해 및 해결과정 2. 풀이방법 1. [ python ] 딕셔너리 이용 #트리 #https://www.acmicpc.net/problem/1068 import sys from collections import deque sys.stdin = open("input.txt","r") n=int(input()) #노드의 개수 tree={} parents=list(map(int,input().split())) #각 노드의 부모노드가 주어진다 d=int(input()) #삭제할 노드 for i in range(n): #트리의 형태 만들어 줌 tree[i]=[] #{0: [], 1: [], 2: [], 3:..
출처:: www.acmicpc.net/problem/15661 분류:: 브루트 포스 1. 문제 이해 및 해결과정 - 딱 같은 수 만큼 링크팀과 스타트팀이 선택하는 것이 아니라, 최소1개 ~ N-1개까지 각각 팀선택이 가능하다 -> 어떻게 구현하지? dfs -> 선택하거나 안하거나 모든 경우의 수를 구하자 2. 풀이방법 1. [ python ] dfs #링크와 스타트 #https://www.acmicpc.net/problem/15661 import sys sys.setrecursionlimit(10**6) sys.stdin = open("input.txt","r") n=int(input()) board=[list(map(int,input().split())) for _ in range(n)] team = ..

출처:: https://www.acmicpc.net/problem/11725 분류:: bfs 1. 문제 이해 및 해결과정 - 가장 가까운 노드 찾으면 된다 2. 풀이방법 1. [ python ] bfs #트리의 부모 찾기 #https://www.acmicpc.net/problem/11725 import sys from collections import deque sys.stdin = open("input.txt","r") n=int(input()) tree=[[] for _ in range(n+1)] visited=[False for _ in range(n+1)] res=[0]*(n+1) for i in range(n-1): a,b=map(int,input().split()) tree[a].append(..
출처:: https://www.acmicpc.net/problem/1759 분류:: 브루트 포스 1. 문제 이해 및 해결과정 2. 풀이방법 #암호 만들기 #https://www.acmicpc.net/problem/1759 import sys from itertools import combinations sys.stdin = open("input.txt","r") n,m=map(int,input().split()) pos=[] data=input().split() data.sort() selected=list(combinations(data,n)) # print(selected) selected.sort() for x in selected: con, vow = 0, 0 for a in x: if a in ..