随笔分类 -  模拟题

摘要:1148 Werewolf Simple Version (20分) Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. 阅读全文
posted @ 2020-03-14 23:26 yxdh 阅读(169) 评论(0) 推荐(0)
摘要:1154 Vertex Coloring (25分) A proper vertex coloring is a labeling of the graph's vertices with colors such that no two vertices sharing the same edge 阅读全文
posted @ 2020-03-13 00:31 yxdh 阅读(125) 评论(0) 推荐(0)
摘要:1153 Decode Registration Card of PAT (25分) A registration card number of PAT consists of 4 parts: the 1st letter represents the test level, namely, T 阅读全文
posted @ 2020-03-13 00:27 yxdh 阅读(255) 评论(0) 推荐(0)
摘要:1105 Spiral Matrix (25分) This time your job is to fill a sequence of N positive integers into a spiral matrix in non increasing order. A spiral matrix 阅读全文
posted @ 2020-03-11 23:14 yxdh 阅读(115) 评论(0) 推荐(0)
摘要:/*本题题意: 输入n个长度均为m的DNA序列,求一个DNA序列,到所有序列的总Hamming距离尽量小。、 两个等长字符串的Hamming距离等于字符不同的位置个数,eg: ACGT和GCGA的Hamming距离为2(左数第1, 4个字符不同)。 输入整数m和n(4≤m≤50, 4≤n≤1000) 阅读全文
posted @ 2019-12-12 12:45 yxdh 阅读(302) 评论(1) 推荐(0)
摘要:/*本题题意求出周期串的最短长度:eg : hohoho 那么此周期串的长度可以为2 (ho) 同时也可以为 6(hohoho) 最短长度当然就是2本题思路: 求出周期串, 必然存在一个周期, 设定一个循环, i代表周期的长度,从1递增,最长的长度为字符串的长度 s.size(), 通过周期 将 字 阅读全文
posted @ 2019-12-12 12:27 yxdh 阅读(177) 评论(0) 推荐(0)