摘要:
比赛链接 A 题解 知识点:贪心。 注意到任意三根木棍的相等最优解是最长减最小,因此从小到大排序,三个三个取,取最小值。 时间复杂度 $O(n\log n)$ 空间复杂度 $O(n)$ 代码 #include <bits/stdc++.h> #define ll long long using na 阅读全文
摘要:
题目链接 题目 题目描述 Farmer John is at the market to purchase supplies for his farm. He has in his pocket K coins (1 <= K <= 16), each with value in the range 阅读全文
摘要:
题目链接 题目 题目描述 Bessie is out at the movies. Being mischievous as always, she has decided to hide from Farmer John for L (1 <= L <= 100,000,000) minutes, 阅读全文