上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 65 下一页
摘要: 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, 阅读全文
posted @ 2023-02-04 21:56 onlyblues 阅读(214) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-02-04 15:56 onlyblues 阅读(99) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-02-02 23:12 onlyblues 阅读(103) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-02-02 19:36 onlyblues 阅读(74) 评论(0) 推荐(0)
摘要: 方程的解 佳佳碰到了一个难题,请你来帮忙解决。 对于不定方程 $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}$ 除 阅读全文
posted @ 2023-02-02 12:22 onlyblues 阅读(102) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2023-02-01 18:00 onlyblues 阅读(105) 评论(0) 推荐(0)
摘要: 牡牛和牝牛 约翰要带 $N$ 只牛去参加集会里的展示活动,这些牛可以是牡牛,也可以是牝牛。 牛们要站成一排,但是牡牛是好斗的,为了避免牡牛闹出乱子,约翰决定任意两只牡牛之间至少要有 $K$ 只牝牛。 请计算一共有多少种排队的方法,所有牡牛可以看成是相同的,所有牝牛也一样,答案对 $5000011$ 阅读全文
posted @ 2023-02-01 12:20 onlyblues 阅读(174) 评论(0) 推荐(0)
摘要: C. Remove the Bracket RSJ has a sequence $a$ of $n$ integers $a_1,a_2, \ldots, a_n$ and an integer $s$. For each of $a_2,a_3, \ldots, a_{n-1}$, he cho 阅读全文
posted @ 2023-01-31 16:31 onlyblues 阅读(95) 评论(0) 推荐(0)
摘要: F. Timofey and Black-White Tree Timofey came to a famous summer school and found a tree on $n$ vertices. A tree is a connected undirected graph withou 阅读全文
posted @ 2023-01-30 19:01 onlyblues 阅读(137) 评论(0) 推荐(0)
摘要: 斐波那契前 n 项和 大家都知道 Fibonacci 数列吧,$f_1=1,f_2=1,f_3=2,f_4=3, \ldots ,f_n=f_{n−1}+f_{n−2}$。 现在问题很简单,输入 $n$ 和 $m$,求 $f_n$ 的前 $n$ 项和 $S_n \bmod m$。 输入格式 共一行, 阅读全文
posted @ 2023-01-28 17:04 onlyblues 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 65 下一页
Web Analytics