[BOJ] 17402 시간 끌기Read more
[BOJ] 2316 도시 왕복하기 2Read more
[BOJ] 11378 열혈강호 4Read more
[BOJ] 17412 도시 왕복하기 1Read more
[BOJ] 14286 간선 끊어가기 2Read more
[BOJ] 6086 최대 유량Read more
[Kick Start 2022 Round B] Hamiltonian TourRead more
[Kick Start 2022 Round B] Unlock the PadlockRead more
[LeetCode] Number of Flowers in Full Bloom

2251. Number of Flowers in Full Bloom

You are given a 0-indexed 2D integer array flowers, where flowers[i] = [starti, endi] means the ith flower will be in full bloom from starti to endi (inclusive). You are also given a 0-indexed integer array persons of size n, where persons[i] is the time that the ith person will arrive to see the flowers.

Return an integer array answer of size n, where answer[i] is the number of flowers that are in full bloom when the ith person arrives.

Read more
[LeetCode] Count Number of Rectangles Containing Each Point

2250. Count Number of Rectangles Containing Each Point

You are given a 2D integer array rectangles where rectangles[i] = [li, hi] indicates that ith rectangle has a length of li and a height of hi. You are also given a 2D integer array points where points[j] = [xj, yj] is a point with coordinates (xj, yj).

The ith rectangle has its bottom-left corner point at the coordinates (0, 0) and its top-right corner point at (li, hi).

Return an integer array count of length points.length where count[j] is the number of rectangles that contain the jth point.

The ith rectangle contains the jth point if 0 <= xj <= li and 0 <= yj <= hi. Note that points that lie on the edges of a rectangle are also considered to be contained by that rectangle.

Read more