[LeetCode] Minimum Number of Days to Make m Bouquets

1482. Minimum Number of Days to Make m Bouquets

You are given an integer array bloomDay, an integer m and an integer k.

You want to make m bouquets. To make a bouquet, you need to use k adjacent flowers from the garden.

The garden consists of n flowers, the ith flower will bloom in the bloomDay[i] and then can be used in exactly one bouquet.

Return the minimum number of days you need to wait to be able to make m bouquets from the garden. If it is impossible to make m bouquets return -1.

Read more
[BOJ] 4181 Convex HullRead more
[BOJ] 1708 볼록 껍질Read more
[BOJ] 22990 사이클Read more
[BOJ] 17506 주때의 자소서 쓰기Read more
[BOJ] 11493 동전 교환Read more
[BOJ] 8992 집기 게임Read more
[LeetCode] Find the Smallest Divisor Given a Threshold

1283. Find the Smallest Divisor Given a Threshold

Given an array of integers nums and an integer threshold, we will choose a positive integer divisor, divide all the array by it, and sum the division’s result. Find the smallest divisor such that the result mentioned above is less than or equal to threshold.

Each result of the division is rounded to the nearest integer greater than or equal to that element. (For example: 7/3 = 3 and 10/2 = 5).

The test cases are generated so that there will be an answer.

Read more
[BOJ] 11111 두부장수 장홍준 2Read more
[BOJ] 9413 제주도 관광Read more