摘要: "Codeforces 1215D Ticket Game 原题" 题目 Monocarp and Bicarp live in Berland, where every bus ticket consists of n digits (n is an even number). During th 阅读全文
posted @ 2020-04-23 09:56 YouXam 阅读(218) 评论(0) 推荐(1) 编辑
摘要: 题目 \ define xhxj (Xin Hang senior sister(学姐)) If you do not know xhxj, then carefully reading the entire description is very important. As the stronge 阅读全文
posted @ 2020-04-22 00:02 YouXam 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 题目 Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules 阅读全文
posted @ 2020-04-21 22:46 YouXam 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目 Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible 阅读全文
posted @ 2020-04-17 12:31 YouXam 阅读(262) 评论(0) 推荐(1) 编辑
摘要: 题目 本题中,我们将用符号 \(\lfloor c \rfloor\) 表示对 \(c\) 向下取整,例如:\(\lfloor 3.0 \rfloor = \lfloor 3.1 \rfloor = \lfloor 3.9 \rfloor = 3\)。 蛐蛐国最近蚯蚓成灾了!隔壁跳蚤国的跳蚤也拿蚯蚓 阅读全文
posted @ 2020-04-17 00:04 YouXam 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 题目 是不是平时在手机里玩吃豆豆游戏玩腻了呢?最近MOKIA手机上推出了一种新的围豆豆游戏,大家一起来试一试吧。 游戏的规则非常简单,在一个N×M的矩阵方格内分布着D颗豆子,每颗豆有不同的分值Vi。游戏者可以选择任意一个方格作为起始格,每次移动可以随意的走到相邻的四个格子,直到最终又回到起始格。最终 阅读全文
posted @ 2020-04-14 22:23 YouXam 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目 An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it i 阅读全文
posted @ 2020-04-14 15:07 YouXam 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 题目 The first stage of train system reform (that has been described in the problem Railways of the third stage of 14th Polish OI. However, one needs no 阅读全文
posted @ 2020-04-12 22:31 YouXam 阅读(99) 评论(0) 推荐(1) 编辑
摘要: 题目 B君在围观一群男生和一群女生玩游戏,具体来说游戏是这样的: 给出一棵n个节点的树,这棵树的每条边有一个权值,这个权值只可能是0或1。 在一局游戏开始时,会确定一个节点作为根。接下来从女生开始,双方轮流进行操作。 当一方操作时,他们需要先选择一个不为根的点,满足该点到其父亲的边权为1; 然后找出 阅读全文
posted @ 2020-04-12 20:25 YouXam 阅读(112) 评论(0) 推荐(1) 编辑
摘要: 题目 On another floor of the A.R.C. Markland N, the young man Simon "Xenon" Jackson, takes a break after finishing his project early (as always). Having 阅读全文
posted @ 2020-04-11 12:44 YouXam 阅读(143) 评论(0) 推荐(0) 编辑
摘要: The Japanese government plans to increase the number of inbound tourists to forty million in the year 2020, and sixty million in 2030. Not only increa 阅读全文
posted @ 2020-04-10 20:03 YouXam 阅读(304) 评论(0) 推荐(3) 编辑
摘要: 题目描述 Chris家的电话铃响起了,里面传出了Chris的老师焦急的声音:“喂,是Chris的家长吗?你们的孩子又没来上课,不想参加考试了吗?”一听说要考试,Chris的父母就心急如焚,他们决定在尽量短的时间内找到Chris。他们告诉Chris的老师:“根据以往的经验,Chris现在必然躲在朋友S 阅读全文
posted @ 2020-04-09 12:37 YouXam 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目 A Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone h 阅读全文
posted @ 2020-04-09 00:00 YouXam 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目 Farmer John has arranged his N $(1 ≤ N ≤ 5,000)$ cows in a row and many of them are facing forward, like good cows. Some of them are facing backwar 阅读全文
posted @ 2020-04-07 12:48 YouXam 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目 In a village called Byteville, there are $n$ houses connected with $n 1$ roads. For each pair of houses, there is a unique way to get from one to a 阅读全文
posted @ 2020-04-06 22:36 YouXam 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目 一棵二叉树可以按照如下规则表示成一个由0、1、2组成的字符序列,我们称之为"二叉树序列S": $$ S=\left\{ \begin{aligned} 0 &\ \ 表示该树没有子节点 \\ 1S_1 &\ \ 表示该树有一个子节点,S_1为其子树的二叉树序列 \\ 2S_1S_2 &\ \ 阅读全文
posted @ 2020-04-06 00:54 YouXam 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 题目 某售货员小T要到若干城镇去推销商品,由于该地区是交通不便的山区,任意两个城镇之间都只有唯一的可能经过其它城镇的路线。小T可以准确地估计出在每个城镇停留的净收益。这些净收益可能是负数,即推销商品的利润抵不上花费。由于交通不便,小T经过每个城镇都需要停留,在每个城镇的停留次数与在该地的净收益无关, 阅读全文
posted @ 2020-04-05 12:36 YouXam 阅读(215) 评论(0) 推荐(1) 编辑
摘要: 题目 NEKO ΦωΦ has just got a new maze game on her PC! The game's main puzzle is a maze, in the forms of a $2×n$ rectangle grid. NEKO's task is to lead a 阅读全文
posted @ 2020-04-04 18:22 YouXam 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 前言 在做并查集的题目时,有的时候会遇到数据范围远大于数据个数的情况,这时候用普通的并查集就会导致MLE,例如下图: ![并查集的一种情况][1] 数据范围是1 7,但是只有5个节点,其中4,5节点并不在数据中,但是建立数组时,却也要建立大小等于数据范围大小(7) 的数组,当差距小时不明显,如果差距 阅读全文
posted @ 2020-03-26 10:00 YouXam 阅读(452) 评论(0) 推荐(2) 编辑
摘要: POJ2182 Lost Cows 题解 题目 有$N$($2 A_N$,则$B_{N 1}=A_{N 1}+2$,相比第一条,最后一头牛编号也比它小,额外加上1,例如 : 因为$3=A_4 A_5=0$,则$B_4=A_4+2=3+2=5$ 因为第i头牛前面有$A_i$头牛编号比它小,所以$B_i 阅读全文
posted @ 2020-03-17 20:28 YouXam 阅读(506) 评论(0) 推荐(0) 编辑