[AtCoder] D - Popcount and XORRead more
[AtCoder] E - Set Add QueryRead more
[AtCoder] A - Spoon Taking ProblemRead more
[AtCoder] B - Parenthesis ArrangementRead more
[AtCoder] D - Gomamayo SequenceRead more
[AtCoder] E - PaintRead more
[AtCoder] B - Bought ReviewRead more
[AtCoder] A - Neq NumberRead more
[LeetCode] Minimum Sum of Values by Dividing Array

3117. Minimum Sum of Values by Dividing Array

You are given two arrays nums and andValues of length n and m respectively.

The value of an array is equal to the last element of that array.

You have to divide nums into m disjoint contiguous subarrays such that for the ith subarray [li, ri], the bitwise AND of the subarray elements is equal to andValues[i], in other words, nums[li] & nums[li + 1] & ... & nums[ri] == andValues[i] for all 1 <= i <= m, where & represents the bitwise AND operator.

Return the minimum possible sum of the values of the m subarrays nums is divided into. If it is not possible to divide nums into m subarrays satisfying these conditions, return -1.

Read more
[LeetCode] Kth Smallest Amount With Single Denomination Combination

3116. Kth Smallest Amount With Single Denomination Combination

You are given an integer array coins representing coins of different denominations and an integer k.

You have an infinite number of coins of each denomination. However, you are not allowed to combine coins of different denominations.

Return the kth smallest amount that can be made using these coins.

Read more