- 博客(10)
- 收藏
- 关注
原创 CodeForces 750H. New Year and Snowy Grid
Pay attention to the output section below, where you will see the information about flushing the output.Bearland is a grid with h rows and w columns. Rows are numbered 1 through h from top to
2017-04-29 13:04:04 867
原创 BZOJ4817: [Sdoi2017]树点涂色
DescriptionBob有一棵n个点的有根树,其中1号点是根节点。Bob在每个点上涂了颜色,并且每个点上的颜色不同。定义一条路径的权值是:这条路径上的点(包括起点和终点)共有多少种不同的颜色。Bob可能会进行这几种操作:1 x:把点x到根节点的路径上所有的点染上一种没有用过的新颜色。2 x y:求x到y的路径的权值。3 x y:在以x为根的子树中选择一个点,
2017-04-23 17:41:55 692
原创 BZOJ4826: [Hnoi2017]影魔
Description影魔,奈文摩尔,据说有着一个诗人的灵魂。事实上,他吞噬的诗人灵魂早已成千上万。千百年来,他收集了各式各样的灵魂,包括诗人、牧师、帝王、乞丐、奴隶、罪人,当然,还有英雄。每一个灵魂,都有着自己的战斗力,而影魔,靠这些战斗力提升自己的攻击。奈文摩尔有 n 个灵魂,他们在影魔宽广的体内可以排成一排,从左至右标号 1 到 n。第 i个灵魂的战斗力为 k[i],灵魂
2017-04-23 17:38:48 392
原创 BZOJ4825: [Hnoi2017]单旋
DescriptionH 国是一个热爱写代码的国家,那里的人们很小去学校学习写各种各样的数据结构。伸展树(splay)是一种数据结构,因为代码好写,功能多,效率高,掌握这种数据结构成为了 H 国的必修技能。有一天,邪恶的“卡”带着他的邪恶的“常数”来企图毁灭 H 国。“卡”给 H 国的人洗脑说,splay 如果写成单旋的,将会更快。“卡”称“单旋 splay”为“spaly”。
2017-04-23 17:36:36 642 1
原创 CodeForces 772D. Varying Kibibits
You are given n integers a1, a2, ..., an. Denote this list of integers as T.Let f(L) be a function that takes in a non-empty list of integers L.The function will output another integer as fo
2017-04-23 17:32:40 624
原创 CodeForces 772C. Vulnerable Kerbals
You are given an integer m, and a list of n distinct integers between 0 and m - 1.You would like to construct a sequence satisfying the properties:Each element is an integer between 0 and m
2017-04-23 17:27:16 1313
原创 Atcoder Grand Contest 013E - Placing Squares
Problem StatementJoisino has a bar of length N, which has M marks on it. The distance from the left end of the bar to the i-th mark is Xi.She will place several squares on this bar. Here, the
2017-04-16 19:35:15 683
原创 Atcoder Grand Contest 013D - Piling Up
Problem StatementJoisino has a lot of red and blue bricks and a large box. She will build a tower of these bricks in the following manner.First, she will pick a total of N bricks and put them in
2017-04-16 19:29:46 912
原创 Atcoder Grand Contest 013C - Ants on a Circle
Problem StatementThere is a circle with a circumference of L. Each point on the circumference has a coordinate value, which represents the arc length from a certain reference point clockwise to th
2017-04-16 19:25:14 1063
原创 BZOJ4502: 串
Description兔子们在玩字符串的游戏。首先,它们拿出了一个字符串集合S,然后它们定义一个字符串为“好”的,当且仅当它可以被分成非空的两段,其中每一段都是字符串集合S中某个字符串的前缀。比如对于字符串集合{"abc","bca"},字符串"abb","abab"是“好”的("abb"="ab"+"b",abab="ab"+"ab"),而字符串“bc”不是“好”的。兔子们想
2017-04-10 19:29:58 748
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人