随笔分类 -  Atcoder

摘要:题目链接 考虑最后形态,一定是有某一个区间 [l,r] 保持初始的样子, l 前面都是 <,r 后面都是 >。 这个区间一定是某两个相邻圆点的位置。设 fi 为前 i 个数全部被覆盖成 < 的概率。设 xl 前面圆点的数量,y 阅读全文
posted @ 2023-12-12 12:50 灰鲭鲨 阅读(34) 评论(0) 推荐(0) 编辑
摘要:题解链接 非常厉害的一道题。 考虑无解是什么情况? R 的个数超过 2n1 先考虑如何判定。从前往后考虑,如果遇到一个 B,那么如果后面有 R,就选最靠前的 R,否则选最靠后的一个 B.如果遇到 R,就选最靠后的一个 B。 但是这个判定很繁琐。我们考虑求出一个合法序列,使得他的 B 阅读全文
posted @ 2023-12-12 12:36 灰鲭鲨 阅读(25) 评论(0) 推荐(0) 编辑
摘要:题目链接 好题。 如果 1n 一直联通,开始即结束。 如果 nmod4=1,那么 12x(x+1)+12(nx)(nx+1) 为偶数。 如果 nmod4=3,那么 \(\frac 12x(x+1)+\frac12(n-x 阅读全文
posted @ 2023-11-26 12:49 灰鲭鲨 阅读(9) 评论(0) 推荐(0) 编辑
摘要:题目链接 简化题意:有一个 n 个点的图,问有多少个长度为 M 的边序列,满足连边后图是二分图。 n30,m109 考虑先强制要求无重边。 定义 fi,ji 个点,j 条边的图的二分图染色数量(染色方式不同算多次)。这个是 阅读全文
posted @ 2023-11-26 12:35 灰鲭鲨 阅读(12) 评论(0) 推荐(0) 编辑
摘要:题目链接 看到严格选 k 个,不难想到 WQS二分。定义 f(x) 为分成 x 段,最多有多少个超过 S 的。然后你会发现他不是凸的。因为他有很多平段,比如把两个很小的合并不改变答案。 换个方向? 考虑定义 f(x) 为有 x 个超过 S 的段 阅读全文
posted @ 2023-11-26 11:59 灰鲭鲨 阅读(28) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a sequence of N positive integers: A1,A2,,AN. You are to rearrange these integers into another sequence $x_1,x_2 阅读全文
posted @ 2023-11-03 20:36 灰鲭鲨 阅读(6) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are 2N integers written on a blackboard. The i-th integer is Ai. Alice and Bob will play a game consisting of N rounds 阅读全文
posted @ 2023-11-03 20:27 灰鲭鲨 阅读(23) 评论(0) 推荐(0) 编辑
摘要:Problem StatementSnuke runs a bakery. He is planning for the next N days. Let us call these days Day 1,2,,N. At the moment, the bakery hires 阅读全文
posted @ 2023-09-25 11:10 灰鲭鲨 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given an integer sequence of length N: A1,A2,...,AN. Let us perform Q operations in order. The i-th operation is d 阅读全文
posted @ 2023-09-22 20:50 灰鲭鲨 阅读(8) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere is a tree with N vertices numbered 1 to N. The i-th edge connects vertices Ai and Bi. Let us keep performing the 阅读全文
posted @ 2023-09-22 20:06 灰鲭鲨 阅读(31) 评论(0) 推荐(0) 编辑
摘要:Problem StatementFor an integer sequence X=(X1,X2,,Xn), let X[L,R] denote the integer sequence (XL,XL+1,,XR). You are given 阅读全文
posted @ 2023-09-22 19:56 灰鲭鲨 阅读(14) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a grid with N rows and M columns. We denote by (i,j) the cell in the i-th row from the top and j-th column from the 阅读全文
posted @ 2023-09-22 19:35 灰鲭鲨 阅读(39) 评论(0) 推荐(0) 编辑
摘要:Problem StatementSnuke got positive integers s1,...,sN from his mother, as a birthday present. There may be duplicate elements. He will circle som 阅读全文
posted @ 2023-09-09 16:09 灰鲭鲨 阅读(11) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere is a grid with N rows and M columns. The square at the i-th row from the top and the j-th column from the left contains 阅读全文
posted @ 2023-09-04 10:36 灰鲭鲨 阅读(41) 评论(0) 推荐(1) 编辑
摘要:Problem StatementYou are given a simple connected undirected graph G with N vertices and M edges. The vertices and edges of G are numbered as 阅读全文
posted @ 2023-09-04 10:28 灰鲭鲨 阅读(18) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are N cards numbered 1 through N. Each face of a card has an integer written on it; card i has Ai on its front and $ 阅读全文
posted @ 2023-08-24 23:02 灰鲭鲨 阅读(11) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are 2N players, numbered 1,2,...,2N. They decided to hold a tournament. The tournament proceeds as follows: Choose a p 阅读全文
posted @ 2023-08-03 20:21 灰鲭鲨 阅读(18) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a set S of strings consisting of 0 and 1, and an integer K. Find the longest string that is a subsequence of K or 阅读全文
posted @ 2023-07-26 12:09 灰鲭鲨 阅读(11) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a sequence of positive integers of length N2, A=(A1, A2, , AN2), and a positive integer S. For this sequ 阅读全文
posted @ 2023-07-25 19:46 灰鲭鲨 阅读(10) 评论(0) 推荐(0) 编辑
摘要:Problem StatementFind the number, modulo 998244353, of permutations P=(P1,P2,,PN) of (1,2,,N) such that: |Pii|X for all 阅读全文
posted @ 2023-07-25 19:27 灰鲭鲨 阅读(23) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示