LATEST🌷
- 백준 백준 boj 20922. 겹치는건 싫어 간단한 투포인터 문제. 하지만 간단하게 가지 않으면 시간초과가 나기 쉬우니까 유념하기.N, K = map(int, input().strip().split())lst = list(map(int, input().strip().split()))D = {}l = set(lst)for x in l: D[x] = 0############################j = 0ans = -1e8cnt = 0for i in range(N): if i > 0: D[lst[i-1]] -= 1 cnt -= 1 while j K: break D[lst[j]] += 1 j += 1 cnt += 1 ans = max(ans, cnt)print(ans)
- 백준 백준 boj 21608. 상어초등학교 코드f = open('input.txt', 'r')N = int(f.readline().strip())friends_info = {}for _ in range(N*N): fi = list(map(int, f.readline().strip().split())) friends_info[fi[0]] = fi[1:]# print(friends_info)grid = [[0]*N for _ in range(N)]score = {0:0, 1:1, 2:10, 3:100, 4:1000}ans = 0def calcluate(r,c,s): n_fr, n_vac_s = 0, 0 for dx, dy in ((-1,0),(1,0),(0,1),(0,-1)): ni, nj = r+dx, c+dy if 0 mx_fr..
- 백준 백준 boj. 17142 연구소 3 [골드 🥇🥇🥇] from collections import dequeimport sysN, M = map(int, sys.stdin.readline().split())grid = []vs = []ans = 1e8for _ in range(N): grid.append(list(map(int, sys.stdin.readline().split())))vs = [(i, j) for i in range(N) for j in range(N) if grid[i][j] == 2]n_empty = len([(i, j) for i in range(N) for j in range(N) if grid[i][j] == 0])def find_mn_dist(accm_virus, v): global ans global n_empty dq =..
- 백준 백준 boj. 17484 진우의 달 여행 [실버 🥈🥈🥈] boj. XX 벽 부수고 이동하기2 [link] 랑 비슷한 유형의 실수를 했던 문제.boj. 17484 진우의 달 여행 [실버 🥈🥈🥈]f = open("input.txt", "r")N, M = map(int, f.readline().split())grid = []for _ in range(N): grid.append(list(map(int, f.readline().split())))dir = [(-1,-1), (-1,0), (-1,1)]grid = grid + [[0]*M]dp = [[[c]*3 for c in grid[0]]] + [[[int(1e8)]*3 for _ in range(M)] for _ in range(N)]def find_min_cost(pi, pj, di): ## dp[pi]..
-
Computer Science CS >> Udemy 강좌 정리 1. It stands for a content division element. It split up or divide your content into separate containers. 즉, 태그는 HTML 문서에서 특정 영역(division)이나 구획(section)을 정의할 때 사용합니다. css파일에서 높이를 100px로 정의한 태그를 index.html에 입력해주면 왼쪽 그림처럼 새로운 영역이 생기게 되고, I'm Sophia. a M.S student. 태그 안에 다른 요소들을 넣어주게 되면, 아래의 오른쪽 그림과 같이 새로 생긴 영역안에 과 내용이 들어가게 됩니다. I'm Sophia. a M.S student. 1.1 Overriding devault values & mar..