摘要: 在c++中,由于sort()函数默认提供的是由小到大的排序方式,因此有时候我们需要自定义排序规则来实现由大到小的排序。 一维vector<>排序 #include <bits/stdc++.h> using namespace std; void printvec(vector<int>& vec) 阅读全文
posted @ 2022-12-24 21:34 blogzzt 阅读(110) 评论(0) 推荐(0) 编辑