Even
[Codeforces] CF1722G Even-Odd XOR
CF1722G Even-Odd XOR 题意 给定一个正整数 \(n\),请你找出一个长度为 \(n\) 数组 \(a\),满足数组是由互不相同的非负且小于 \(2^{31}\) 的整数组成,并且该数组中奇数项上元素的异或值与偶数项上元素的异或值要相等。 思路 根据异或的交换律,可以发现:奇偶位异 ......
[UVA12683] Odd and Even Zeroes
Description 给出 \(n\),求出 \(0!, 1!, 2! \ldots, n!\) 中有几个末尾有偶数个 \(0\)。 \(1\le n\le 10^{18}\)。 Solution 根据基本结论,一个数末尾 \(0\) 的个数等于该数有几个因数 \(5\)。而一个数的阶乘末尾有几个 ......
Ubuntu22.04运行Splash Docker镜像报错,cloud not load the Qt platform xcb in even though it was found
Ubuntu 22.04 运行Splash Docker镜像报错,cloud not load the Qt platform xcb in even though it was found
重新执行同样的语句,即恢复正常。 ......
[AT_abc313_d] Odd or Even
简单题,但是为什么赛场上 WA 了呢? 弱化题目,设 $n = k + 1$,发现只需要每一个数不取询问 $k$ 次,通过前缀和得出。 再设 $k + 1 \ | \ n$,发现只需要类似分块即可解决。 回到原题,最后的一部分如何计算?我们可以对 $[n - k, n]$ 这个区间做询问,但是对于已 ......
Even(23Nowcoder6.J)(二分+可持久化线段树)
### 题意: > 给定一个序列$a$,定义一次操作选择序列中一个元素$a[i]$, 使$a_i = \lfloor \frac{a_i}{2} \rfloor$,其中$a_i$为当前序列中的最大偶数,若没有则是最大奇数。 > > 有$q$组询问,每次给定$k, l, r$分别表示操作次数和操作区间 ......
[LeetCode] 2178. Maximum Split of Positive Even Integers
You are given an integer finalSum. Split it into a sum of a maximum number of unique positive even integers. For example, given finalSum = 12, the fol ......
(博弈论)Even Number Addicts
Alice 和 Bob 正在一个序列 ai 上玩游戏,Alice 先手,轮流玩。每一轮当前玩家可以取走序列中任意一个数,直到取完。 如果最后 Ailce 取走的数的和为偶数,则 Ailce 赢,否则 Bob 赢。保证每个人用最优策略玩。对于每组数据,输出赢家。 输入输出样例 输入 #1复制 4 3 ......
AtCoder Regular Contest 146 C Even XOR
[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc146_c "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc146/tasks/arc146_c "AtCoder 传送门") 好可爱的题啊。 没 ......
报错 qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found
参考: https://blog.csdn.net/qq_39938666/article/details/120452028 使用ubuntu系统下python的seaborn模块画图,报错: qt.qpa.plugin: Could not load the Qt platform plugin ......