Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. struct Comp {
  2. const vector<int>& nums;
  3. explicit Comp(const vector<int>& nums): nums(nums) {}
  4.  
  5. bool operator()(const slot_type& lhs, const slot_type& rhs) const {
  6. return nums[lhs.second] - nums[lhs.first] > nums[rhs.second] - nums[rhs.first];
  7. }
  8. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement