当前位置:网站首页>Sort custom function
Sort custom function
2022-07-01 01:32:00 【Weiyang acridine】
Define a two-dimensional array
vector<vector<int>> ret;
(1) Press two-dimensional array ret[i][1] The size of is arranged from large to small
static bool cmp(vector<int> &m, vector<int> &n) {
retutn m[1] > n[1]; // Represents a two-dimensional array
}
sort(ret.begin(), ret.end(), cmp)
(2) Press two-dimensional array ret[i][1] The size of is arranged from small to large ( Force buckle platform not used static Will make mistakes ,sort Request to static)
static bool cmp(vector<int> &m, vector<int> &n) {
retutn m[1] < n[1]; // Represents a two-dimensional array
}
边栏推荐
- Green, green the reed. dew and frost gleam.
- Digital IC design process summary
- 数字IC设计流程总结
- One of the basics - overview of sta Basics
- Unknown database连接数据库错误
- dc_labs--lab1的学习与总结
- Basic knowledge II - Basic definitions related to sta
- 1500w播放下还藏着什么热点?B站2个未来趋势你不得错过
- 友盟(软件异常实时监听的好帮手:Crash)接入教程(有点基础的小白最易学的教程)
- Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.
猜你喜欢

一站式洞察行业热点,飞瓜数据B站新功能「流量大盘」上线!

Install redis database and download redis Desktop Manager in win11

Service grid ASM year end summary: how do end users use the service grid?

关于白盒测试,这些技巧你得游刃有余~

迪赛智慧数——其他图表(平行坐标图):2021年应届专业就业情况

Unknown database connection database error

Looksrare team's "cash out" caused disturbance

视频教程 | 长安链推出系列视频教程合集(入门)

Complete software development process

Pre training / transfer learning of models
随机推荐
Strictmode jamming and leakage detection -strictmode principle (2)
日志 logrus第三方库的使用
Parity linked list [two general directions of linked list operation]
Construction and beautification of personal blog
TypeError: Argument ‘angle‘ can not be treated as a double
ESP8266 RC522
gin_gorm
使用StrictMode-StrictMode原理(1)
The liquor and tourism sector recovers, and Yaduo continues to dream of listing. How far is it from "the first share of the new accommodation economy"?
What will Web3 bring in the future?
元宇宙为 VR/AR 带来的新机会
物业怎么发短信通知给业主?
Pre training / transfer learning of models
Strictmode analysis registration strictmode principle (4)
1500w播放下还藏着什么热点?B站2个未来趋势你不得错过
【Qt5-基础篇_1】从0开始,德天老师和你一起学习——窗口简介
StrictMode卡顿与泄漏检测-StrictMode原理(2)
K210 access control complete
QT5-布局在创作中的理解应用
农产品换房?“变相”购房补贴!