摘要: Kelukin is a businessman. Every day, he travels around cities to do some business. On August 17th, in memory of a great man, citizens will read a book 阅读全文
posted @ 2018-08-03 19:40 StarHai 阅读(226) 评论(0) 推荐(0) 编辑
摘要: ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗? Input每 阅读全文
posted @ 2018-08-03 19:33 StarHai 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game 阅读全文
posted @ 2018-08-03 19:29 StarHai 阅读(188) 评论(0) 推荐(0) 编辑
摘要: The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the r 阅读全文
posted @ 2018-08-03 19:23 StarHai 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 现在有n堆石子,第i堆有ai个石子。现在要把这些石子合并成一堆,每次只能合并相邻两个,每次合并的代价是两堆石子的总石子数。求合并所有石子的最小代价。 Input 第一行包含一个整数T(T<=50),表示数据组数。每组数据第一行包含一个整数n(2<=n<=100),表示石子的堆数。第二行包含n个正整数 阅读全文
posted @ 2018-08-03 19:19 StarHai 阅读(294) 评论(0) 推荐(0) 编辑