学习使用sort函数,对对象的元素进行二次排序
只需要改变比较函数就可以。加两个条件就可以了
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Point
{
public:
int x, y, d;
};
bool iscloseup(const Point &p1, const Point &p2)
{
if (p1.x == p2.x)
if (p1.y =&