随笔分类 - Atcoder
摘要:题目链接 考虑最后形态,一定是有某一个区间 保持初始的样子, 前面都是 <, 后面都是 >。 这个区间一定是某两个相邻圆点的位置。设 为前 个数全部被覆盖成 < 的概率。设 为 前面圆点的数量,
阅读全文
摘要:题解链接 非常厉害的一道题。 考虑无解是什么情况? R 的个数超过 先考虑如何判定。从前往后考虑,如果遇到一个 B,那么如果后面有 R,就选最靠前的 R,否则选最靠后的一个 B.如果遇到 R,就选最靠后的一个 B。 但是这个判定很繁琐。我们考虑求出一个合法序列,使得他的 B
阅读全文
摘要:题目链接 简化题意:有一个 个点的图,问有多少个长度为 的边序列,满足连边后图是二分图。 考虑先强制要求无重边。 定义 为 个点, 条边的图的二分图染色数量(染色方式不同算多次)。这个是
阅读全文
摘要:题目链接 看到严格选 个,不难想到 WQS二分。定义 为分成 段,最多有多少个超过 的。然后你会发现他不是凸的。因为他有很多平段,比如把两个很小的合并不改变答案。 换个方向? 考虑定义 为有 个超过 的段
阅读全文
摘要:Problem StatementWe have a sequence of positive integers: . You are to rearrange these integers into another sequence $x_1,x_2
阅读全文
摘要:Problem StatementThere are integers written on a blackboard. The -th integer is . Alice and Bob will play a game consisting of rounds
阅读全文
摘要:Problem StatementSnuke runs a bakery. He is planning for the next days. Let us call these days Day . At the moment, the bakery hires
阅读全文
摘要:Problem StatementYou are given an integer sequence of length : . Let us perform operations in order. The -th operation is d
阅读全文
摘要:Problem StatementThere is a tree with vertices numbered to . The -th edge connects vertices and . Let us keep performing the
阅读全文
摘要:Problem StatementWe have a grid with rows and columns. We denote by the cell in the -th row from the top and -th column from the
阅读全文
摘要:Problem StatementSnuke got positive integers from his mother, as a birthday present. There may be duplicate elements. He will circle som
阅读全文
摘要:Problem StatementThere is a grid with rows and columns. The square at the -th row from the top and the -th column from the left contains
阅读全文
摘要:Problem StatementYou are given a simple connected undirected graph with vertices and edges. The vertices and edges of are numbered as
阅读全文
摘要:Problem StatementThere are cards numbered through . Each face of a card has an integer written on it; card has on its front and $
阅读全文
摘要:Problem StatementThere are players, numbered . They decided to hold a tournament. The tournament proceeds as follows: Choose a p
阅读全文
摘要:Problem StatementYou are given a set of strings consisting of 0 and 1, and an integer . Find the longest string that is a subsequence of or
阅读全文
摘要:Problem StatementWe have a sequence of positive integers of length , , and a positive integer . For this sequ
阅读全文