_空白
_空白
全部文章
题解
归档
标签
去牛客网
登录
/
注册
从零开始的Acmer
全部文章
/ 题解
(共4篇)
甄总搬石头---优先队列+贪心
题目描述现在草地上有n堆石头,甄总想要合并这n堆石头成为1堆,但是他每次能力有限,所以只能一次合并2堆石头至1堆。现在已知第i堆石头有ai块,假设甄总要合并第i堆和第j堆石头,则需要花费ai+aj的力气。给出n堆石头每堆石头的个数,求出甄总要合并n堆成1堆石头一共需要多少力气。输入描述:第1行输入一...
2020-07-31
2
848
14409 化简分数---gcd+化简公式
题目描述给出两个分数,求他们的和,化简为最简式。 输入描述:第1行输入一个整数T,表示有T组测试数据。第2-T+1行,每行输入4个正整数a,b,c,d,表示两个分数a/b和c/d。数据保证:0<T≤1000,0<a,b,c,d≤1000。输出描述:对于每组测试数据,输出两个整数e和f,表...
2020-07-31
1
822
SCAU2020暑假组队训练 #1
三个小时把能写的写完了2333 A: Array's Hash Vasya has invented a new hash function of an array. It is calculated as follows. While the array has at least two elem...
2020-07-15
0
884
2020牛客暑期多校训练营(第二场)D.Duration题解
题目描述:Given two moments on the same day in the form of HH:MM:SS, print the number of seconds between the two moments.输入描述:Input two lines each contains...
2020-07-14
1
698