上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 35 下一页
摘要: 题目描述 设有一棵二叉树,如图: 其中,圈中的数字表示结点中居民的人口。圈边上数字表示结点编号,现在要求在某个结点上建立一个医院,使所有居民所走的路程之和为最小,同时约定,相邻接点之间的距离为1。如上图中, 若医院建在1 处,则距离和=4+12+2*20+2*40=136;若医院建在3 处,则距离和 阅读全文
posted @ 2019-07-14 17:29 #Cookies# 阅读(243) 评论(0) 推荐(0)
摘要: 题目描述 笨小猴的词汇量很小,所以每次做英语选择题的时候都很头疼。但是他找到了一种方法,经试验证明,用这种方法去选择选项的时候选对的几率非常大! 这种方法的具体描述如下:假设maxn是单词中出现次数最多的字母的出现次数,minn是单词中出现次数最少的字母的出现次数,如果maxn-minn是一个质数, 阅读全文
posted @ 2019-07-13 23:03 #Cookies# 阅读(250) 评论(0) 推荐(0)
摘要: 题目描述 Bessie has wandered off the farm into the adjoining farmer's land. He raises delicious papaya fruit, which is a delicacy for cows. The papaya jun 阅读全文
posted @ 2019-07-13 22:26 #Cookies# 阅读(376) 评论(0) 推荐(0)
摘要: 题目描述 如果一个数从左往右读和从右往左读都是一样,那么这个数就叫做“回文数”。例如,12321就是一个回文数,而77778就不是。当然,回文数的首和尾都应是非零的,因此0220就不是回文数。 事实上,有一些数(如21),在十进制时不是回文数,但在其它进制(如二进制时为10101)时就是回文数。 编 阅读全文
posted @ 2019-07-13 22:22 #Cookies# 阅读(349) 评论(0) 推荐(0)
摘要: 题目描述 Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from the N 阅读全文
posted @ 2019-07-13 22:18 #Cookies# 阅读(165) 评论(0) 推荐(0)
摘要: 题目描述 Farmer John wants the cows to prepare for the county jumping competition, so Bessie and the gang are practicing jumping over hurdles. They are ge 阅读全文
posted @ 2019-07-13 21:35 #Cookies# 阅读(150) 评论(0) 推荐(0)
摘要: 题目描述 Farmer John is distributing chocolates at the barn for Valentine's day, and B (1 <= B <= 25,000) of his bulls have a special cow in mind to recei 阅读全文
posted @ 2019-07-13 21:33 #Cookies# 阅读(217) 评论(0) 推荐(0)
摘要: 题目描述 Bessie is playing hide and seek (a game in which a number of players hide and a single player (the seeker) attempts to find them after which vari 阅读全文
posted @ 2019-07-12 23:44 #Cookies# 阅读(242) 评论(0) 推荐(0)
摘要: 题目描述 One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A 阅读全文
posted @ 2019-07-12 23:40 #Cookies# 阅读(221) 评论(0) 推荐(0)
摘要: 【题目描述】: 有 N 个盘子,每个盘子上写着一个仅由小写字母组成的英文单词。你需要给这些盘子安排一个合适的顺序,使得相邻两个盘子中,前一个盘子上单词的末字母等于后一个盘子上单词的首字母。请你编写一个程序,判断是否能达到这一要求。如果能,请给出一个合适的顺序。 【输入描述】: 多组数据。第一行给出数 阅读全文
posted @ 2019-07-12 17:23 #Cookies# 阅读(204) 评论(0) 推荐(0)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 35 下一页