摘要: Xiangqi is one of the most popular two-player board games in China. The game represents a battle between two armies with the goal of capturing the ene 阅读全文
posted @ 2018-02-07 20:51 soildom 阅读(594) 评论(0) 推荐(0) 编辑
摘要: You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Be 阅读全文
posted @ 2018-01-21 11:50 soildom 阅读(309) 评论(0) 推荐(0) 编辑
摘要: DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymin 阅读全文
posted @ 2018-01-16 15:48 soildom 阅读(333) 评论(0) 推荐(0) 编辑
摘要: A children's puzzle that was popular 30 years ago consisted of a 5 5 frame which contained 24 small squares of equal size. A unique letter of the alph 阅读全文
posted @ 2018-01-15 18:55 soildom 阅读(228) 评论(0) 推荐(0) 编辑
摘要: N个数排成一列,Q个询问,每次询问一段区间内的数的极差是多少。 N个数排成一列,Q个询问,每次询问一段区间内的数的极差是多少。 Input 第一行两个整数N(1≤N≤50000),Q(1≤Q≤200000)。接下来一行N个整数a1 a2 a3 ....an,(1≤ai≤1000000000)。接下来 阅读全文
posted @ 2017-12-04 23:23 soildom 阅读(203) 评论(0) 推荐(0) 编辑
摘要: After the big earthquake, a lot of roads have been destroyed, some towns are disconnected with each other. In order to save the trapped as soon as pos 阅读全文
posted @ 2017-12-04 21:56 soildom 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的T-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的T-shirt。但是每当我们的工作人 阅读全文
posted @ 2017-12-02 19:34 soildom 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 给你一个有n个点和m条边的无向连通图,每条边都有一个权值w.我们定义,对于一条路径,它的Charm value为该路径上所有边的权值的最大值与最小值的差.询问从1到n的所有路径的Charm value的最小值. 给你一个有n个点和m条边的无向连通图,每条边都有一个权值w.我们定义,对于一条路径,它的 阅读全文
posted @ 2017-11-25 16:16 soildom 阅读(302) 评论(0) 推荐(0) 编辑
摘要: Kruskal算法 阅读全文
posted @ 2017-11-23 21:26 soildom 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 假设一个旋转鼓的表面被等分为16个部分,如图所示,其中每一部分分别由导体或绝缘体构成,图中阴影部分表示导体,空白部分表示绝缘体,导体部分给出信号1,绝缘体部分给出信号0。根据鼓轮转动时所处的位置, 四个触头A、B、C、D将获得一定的信息。因此,鼓轮的位置可用二进制信号表示。试问如何选取鼓轮16个部分 阅读全文
posted @ 2017-11-19 17:00 soildom 阅读(1875) 评论(0) 推荐(0) 编辑