GoCalf Calf 的自留地 · 昙花一现

全站内容

Calf

这里收录 Calf 在 GoCalf 上的文章、笔记与其他内容。

  • 3259. Maximum Energy Boost From Two Drinks

    Coding

    #Problem You are given two integer arrays energyDrinkA and energyDrinkB of the same length n by a futuristic sports scientist. These arrays represent the energy boosts per hour provided by two different energy drinks, A and B, respectively. …

    medium
  • 3261. Count Substrings That Satisfy K-Constraint II

    Coding

    #Problem You are given a binary string s and an integer k. You are also given a 2D integer array queries, where queries[i] = [lᵢ, rᵢ]. A binary string satisfies the k-constraint if either of the following conditions holds: The number of 0’s …

    hard
  • 3264. Final Array State After K Multiplication Operations I

    Coding

    #Problem You are given an integer array nums, an integer k, and an integer multiplier. You need to perform k operations on nums. In each operation: Find the minimum value x in nums. If there are multiple occurrences of the minimum value, …

    easy
  • 3266. Final Array State After K Multiplication Operations II

    Coding

    #Problem You are given an integer array nums, an integer k, and an integer multiplier. You need to perform k operations on nums. In each operation: Find the minimum value x in nums. If there are multiple occurrences of the minimum value, …

    hard
  • 3270. Find the Key of the Numbers

    Coding

    #Problem You are given three positive integers num1, num2, and num3. The key of num1, num2, and num3 is defined as a four-digit number such that: Initially, if any number has less than four digits, it is padded with leading zeros. The iᵗʰ …

    easy
  • 3274. Check if Two Chessboard Squares Have the Same Color

    Coding

    #Problem You are given two strings, coordinate1 and coordinate2, representing the coordinates of a square on an 8 x 8 chessboard. Below is the chessboard for reference. problemReturn true if these two squares have the same color and false …

    easy
  • 3280. Convert Date to Binary

    Coding

    #Problem You are given a string date representing a Gregorian calendar date in the yyyy-mm-dd format. date can be written in its binary representation obtained by converting year, month, and day to their binary representations without any …

    easy
  • 3285. Find Indices of Stable Mountains

    Coding

    #Problem There are n mountains in a row, and each mountain has a height. You are given an integer array height where height[i] represents the height of mountain i, and an integer threshold. A mountain is called stable if the mountain just …

    easy
  • 3291. Minimum Number of Valid Strings to Form Target I

    Coding

    #Problem You are given an array of strings words and a string target. A string x is called valid if x is a prefix of any string in words. A prefix of a string is a substring that starts from the beginning of the string and extends to any …

    medium hard
  • 3292. Minimum Number of Valid Strings to Form Target II

    Coding

    3291. Minimum Number of Valid Strings to Form Target I 的进阶版,题目一模一样,但 words 的长度从 5 * 10³ 增加到 5 * 10⁵,target 的长度从 5 * 10³ 增加到 5 * 10⁴。 如果按 problem 3291 中 O(n²) 复杂度的 trie 树 + 动态规划是无法 AC 的,需要用更快的 AC 自动机。

    hard