并不是多困难或者有趣的题,写sol仅仅是因为觉得好笑()。 题目大意 三堆石子 Nim 游戏,第 i i i 堆石子数量在 [ l i , r i ] [l_i , r_i] [li,ri] 中随机,求先手必胜的概率,对 1 0 9 + 7 10^9+7 109+7 取模。 l i , r i ≤ 1 0 9 l_i , r_i≤10^9 li,ri≤109。 题解 说人
Grigory has n magic stones, conveniently numbered from 1 to n. The charge of the i-th stone is equal to ci. Sometimes Grigory gets bored and selects some inner stone (that is, some stone with index i
This way 题意: 有n个石头,这些石头一开始有一些能量e[i],并且每过一个单位的时间会增长l[i],直到有c[i]的能量为止。现在有q个询问 t l r表示在t时刻的时候收割l-r的所有能量,并且将其能量置为0,然后这些石头的能量重新增长。问你最后你收割了多少能量 题解: for一遍所有的石头,用一个set维护在这个时候有哪些收割的时刻。 每个石头有两种状态:未达到c[i]和已达
题目: You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in Sis a type of stone you have. You want to know how many of t
题目描述 There are N stones arranged in a row. Every stone is painted white or black. A string S represents the color of the stones. The i-th stone from the left is white if the i-th character of S is .,
You and your friend are playing a game in which you and your friend take turns removing stones from piles. Initially there are N N piles with a1,a2,a3,…,aN a1,a2,a3,…,aN number of stones. On each
1033. 移动石子直到连续 三枚石子放置在数轴上,位置分别为 a,b,c。 每一回合,我们假设这三枚石子当前分别位于位置 x, y, z 且 x < y < z。从位置 x 或者是位置 z 拿起一枚石子,并将该石子移动到某一整数位置 k 处,其中 x < k < z 且 k != y。 当你无法进行任何移动时,即,这些石子的位置连续时,游戏结束。 要使游戏结束,你可以执行的最小和最大