목록2024/01/05 (2)
파란색가운의 개발 블로그
import sys # sys.stdin.readline() from collections import deque sys.setrecursionlimit(100000000) import heapq import copy import itertools from itertools import combinations from itertools import permutations INF = 1e9 def findMax(): start = 0 end = max(array) while start mid: sum += (array[i] - mid) # 떡이 잘리는 부분 if sum == M: break elif sum > M: start = mid + 1 else: end = mid - 1 # 시작점을 늘려 retur..
import sys # sys.stdin.readline() from collections import deque sys.setrecursionlimit(100000000) import heapq import copy import itertools from itertools import combinations from itertools import permutations INF = 1e9 def findelem(arr,targetElement): start = 0 end = len(arr) while start targetElement: end = mid - 1 else: start = mid + 1 return "no" N = int(input()) arr = list(map(int,sys.stdin...