MENU

不成熟的文章

Solution. LG3863 序列

Description

给定长度为 $n$ 的序列,$q$ 次操作,操作有两种:

  • 区间加减;
  • 查询某个位置上的数在多少个历史版本中 $\ge k$。

$2\le n,q\le 10^5$

Read More

Erdos-Ginzburg-Ziv Theorem

Erdos-Ginzburg-Ziv Theorem

对任意 $2n-1$ 个整数,可以从中选出 $n$ 个使得这 $n$ 个数的和是 $n$ 的倍数。

形式化的,对任意 $a_1,\dots,a_{2n-1}\in \mathbb Z$,存在两两不同的 $i_1,\dots,i_n$ 使得:
$$
a_{i_1}+\dots+ a_{i_n}\equiv 0\pmod n
$$

Read More