iHandy
最后更新于
这有帮助吗?
单项选择题 8 道,不定项选择题 5 道,问答题 2 道,编程题 1 道
问题描述
剑指 Offer:
贪心(80%)
自定义排序(80%)
代码应该没什么问题,最后把结果转成 int/long long
应该就能 AC 了——可能有一个用例是全 0
上面用贪心的时候还记得转 int,这里就忘了...
```C++
include
include
include
include
include
using namespace std;
string foo(vector ns) { sort(ns.begin(), ns.end(), { return r + l < l + r; });
}
int main() {
} ```