摘要: 题目来源:点击打开链接 题目描述 给出一个整数n(n1,则可能的情况为224,214,124,114。 解决方法就是利用广搜,注意每次替换为新的数时的处理。 # include# include# includeusing namespace std;queu... 阅读全文
posted @ 2018-05-09 20:47 xzhws 阅读(66) 评论(0) 推荐(0) 编辑
摘要: Background Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to ano... 阅读全文
posted @ 2018-05-09 19:40 xzhws 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 参考来源:http://www.cnblogs.com/huashanqingzhu/category/852024.html 描述 给出两个单词(开始单词和结束单词)以及一个词典。找出从开始单词转换到结束单词,所需要的最短转换序列。转换的规则如下: 1、每次... 阅读全文
posted @ 2018-05-09 11:47 xzhws 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 参考自:点击打开链接 描述 宇航员Bob有一天来到火星上,他有收集硬币的习惯。于是他将火星上所有面值的硬币都收集起来了,一共有n种,每种只有一个:面值分别为a1,a2… an。 Bob在机场看到了一个特别喜欢的礼物,想买来送给朋友Alice,这个礼物的价格... 阅读全文
posted @ 2018-05-08 23:03 xzhws 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 参考自:点击打开链接 描述 We have received an order from Pizoor Communications Inc. for a special communication system. The system consists ... 阅读全文
posted @ 2018-05-06 15:38 xzhws 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 参考:http://openjudge.cn/tag/?tag_name=%E6%90%9C%E7%B4%A2 安利一位dalao的博客~点击打开链接 阅读全文
posted @ 2018-05-05 14:54 xzhws 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 转载自:这位博主 描述 Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive... 阅读全文
posted @ 2018-05-05 14:43 xzhws 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 参考自:这位博主 描述 George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wan... 阅读全文
posted @ 2018-05-04 21:55 xzhws 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 描述 现在有一些长度相等的DNA串(只由ACGT四个字母组成),请将它们按照逆序对的数量多少排序。 逆序对指的是字符串A中的两个字符A[i]、A[j],具有i A[j] 的性质。如字符串”ATCG“中,T和C是一个逆序对,T和G是另一个逆序对,这个字符串... 阅读全文
posted @ 2018-05-04 13:14 xzhws 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 描述 现在有一些长度相等的DNA串(只由ACGT四个字母组成),请将它们按照逆序对的数量多少排序。 逆序对指的是字符串A中的两个字符A[i]、A[j],具有i < j 且 A[i] > A[j] 的性质。如字符串”ATCG“中,T和C是一个逆序对,T和G是另一个逆序对,这个字符串的逆序对数为2。 输 阅读全文
posted @ 2018-05-04 13:14 xzhws 阅读(537) 评论(0) 推荐(0) 编辑