일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- raspberrypi
- 라즈베리파이3
- Python
- 13237
- 라즈비안
- 라즈베리파이
- 알고리즘
- 16.04
- nav-tab
- baekjun
- algotythm
- dp
- 크롤링
- springboot3.x
- node.js
- 파이썬
- 트리
- bootstrap
- 2909
- ubuntu
- Algorythm
- Crawling
- 라즈베리파이3b+
- MongoDB
- NAV
- CSS
- dynaminprogramming
- 2579
- HTML
- 백준
- Today
- Total
목록알고리즘 (33)
노트
n = int(input()) lst = list(map(int,input().split())) cnt = 0 while len(lst) > 0: temp = set(sorted(lst)) for t in temp: del lst[lst.index(t)] cnt += 1 print(cnt)
보호되어 있는 글입니다.
n, a, b = map(int,input().split()) hakgi = [list(map(int,input().split())) for _ in range(10)] if b >= 130 and a >= 66: print("Nice") else: for i in range(8-n): a += hakgi[i][0] * 3 b += hakgi[i][0] * 3 score = 6 - hakgi[i][0] if score = 130 and a >= 66: print("Nice") else: print("Nae ga wae")
n = int(input()) parent = [int(input()) for _ in range(n)] high = [0 for i in range(n)] for i in range(n): if parent[i]==-1: continue high[i]=high[parent[i]-1]+1 for i in range(n): print(high[i])
n = int(input()) s = [list(map(int,input().split())) for _ in range(n)] dp = [0 for i in range(n+1)] for i in range(n): for j in range(i+s[i][0],n+1): if dp[j]
import sys from collections import deque def bfs(v): queue = deque([v]) visited[v] = 1 while queue: target = queue.popleft() for i in graph[target]: if not visited[i]: visited[i] = visited[target] + 1 queue.append(i) n, m = map(int, sys.stdin.readline().split()) graph = [[] for _ in range(n + 1)] for i in range(m): a, b = map(int, sys.stdin.readline().split()) graph[a].append(b) graph[b].append(..
import math T = int(input()) for _ in range(T): n, m = map(int, input().split()) bridge = math.factorial(m) // (math.factorial(n) * math.factorial(m - n)) print(bridge)
import sys sys.setrecursionlimit(10**6) input = sys.stdin.readline # dfs 함수 def dfs(graph, v, visited): visited[v] = True for i in graph[v]: if not visited[i]: dfs(graph, i, visited) n, m = map(int, input().split()) graph = [[] for _ in range(n+1)] for i in range(m): u, v = map(int, input().split()) graph[u].append(v) graph[v].append(u) count = 0 visited = [False] * (n+1) for i in range(1, n+1):..