摘要:
E. Monsters (hard version) This is the hard version of the problem. In this version, you need to find the answer for every prefix of the monster array 阅读全文
摘要:
Disconnect Path in a Binary Matrix by at Most One Flip You are given a 0-indexed $m \times n$ binary matrix grid . You can move from a cell (row, col) 阅读全文
摘要:
Maximize Win From Two Segments There are some prizes on the X-axis. You are given an integer array prizePositions that is sorted in non-decreasing ord 阅读全文
摘要:
G2. Teleporters (Hard Version) The only difference between the easy and hard versions are the locations you can teleport to. Consider the points $0,1, 阅读全文
摘要:
E. Negatives and Positives Given an array $a$ consisting of $n$ elements, find the maximum possible sum the array can have after performing the follow 阅读全文
摘要:
Minimum Cost to Make Array Equal You are given two 0-indexed arrays nums and cost consisting each of $n$ positive integers. You can do the following o 阅读全文
摘要:
Count Increasing Quadruplets Given a 0-indexed integer array nums of size $n$ containing all numbers from $1$ to $n$, return the number of increasing 阅读全文
摘要:
方程的解 佳佳碰到了一个难题,请你来帮忙解决。 对于不定方程 $a_1 + a_2+ \ldots + a_{k−1} + a_k = g(x)$,其中 $k \geq 1$ 且 $k \in N^{*}$,$x$ 是正整数,$g(x) = x^{x} \bmod 1000$(即 $x^{x}$ 除 阅读全文
摘要:
Put Marbles in Bags You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith marble. You are also gi 阅读全文
摘要:
牡牛和牝牛 约翰要带 $N$ 只牛去参加集会里的展示活动,这些牛可以是牡牛,也可以是牝牛。 牛们要站成一排,但是牡牛是好斗的,为了避免牡牛闹出乱子,约翰决定任意两只牡牛之间至少要有 $K$ 只牝牛。 请计算一共有多少种排队的方法,所有牡牛可以看成是相同的,所有牝牛也一样,答案对 $5000011$ 阅读全文