G. Fake News (easy) time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As it's the first of April, Heidi is suspecting that the news she reads today are fake, and she does not want to look sil…
Description Heidi's friend Jenny is asking Heidi to deliver an important letter to one of their common friends. Since Jenny is Irish, Heidi thinks that this might be a prank. More precisely, she suspects that the message she is asked to deliver state…
Description The marmots have prepared a very easy problem for this year's HC2 – this one. It involves numbers n, k and a sequence of n positive integersa1, a2, ..., an. They also came up with a beautiful and riveting story for the problem statement.…
Description Your search for Heidi is over – you finally found her at a library, dressed up as a human. In fact, she has spent so much time there that she now runs the place! Her job is to buy books and keep them at the library so that people can borr…
Helvetic Coding Contest 2019 A2 题意:给一个长度为 n 的01序列 y.认为 k 合法当且仅当存在一个长度为 n 的01序列 x,使得 x 异或 x 循环右移 k 位的 01 串得到 y .问合法的 k 的个数. \(n \le 2*10^5\) key:找规律 考虑如何check一个 k 是否合法.那么对于所有的 i 和 i-k 在模 n 的意义下,如果 y 的第 i 位为 0 则二者必须不同,否则必须相同.这样可以用并查集判断是否合法.实际上是把相同的缩起来后…