当前位置:网站首页>返回数组排序后下标
返回数组排序后下标
2022-04-23 14:08:00 【抠脚老騷】
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <numeric>
#include <algorithm>
using namespace std;
int a[3]={3,1,2};
bool cmp(int i,int j){
return a[i]<a[j];
}
int main()
{
int b[3];
iota(b,b+3,0);
sort(b,b+3,cmp);
for (int x:b) {
cout<<x<<" ";
}
cout<<endl;
return 0;
}
版权声明
本文为[抠脚老騷]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_45436102/article/details/124197563
边栏推荐
- jsp学习3
- Installation and use of postman pit
- 帆软报表设置单元格填报以及根据值的大小进行排名方法
- Prediction of tomorrow's trading limit of Low Frequency Quantization
- 修改ddt生成的测试用例名称
- HyperBDR云容灾V3.2.1版本发布|支持更多云平台,新增监控告警功能
- Win10 comes with groove music, which can't play cue and ape files. It's a curvilinear way to save the country. It creates its own aimpack plug-in package, and aimp installs DSP plug-in
- HyperBDR云容灾V3.3.0版本发布|容灾功能升级,资源组管理功能优化
- jsp学习1
- 按实际取,每三级分类汇总一次,看图知需求
猜你喜欢
星界边境文本自动翻译机(高级版)使用说明
HyperMotion云迁移完成阿里云专有云产品生态集成认证
Three point positioning based on ibeacons (wechat applet)
RobotFramework 之 用例标签机制
MYSQL 主从同步避坑版教程
Some experience of using dialogfragment and anti stepping pit experience (getactivity and getdialog are empty, cancelable is invalid, etc.)
Windos中安装labellmg教程
帆软分割求解:一段字符串,只取其中某个字符(所需要的字段)
Mock测试
使用DialogFragment的一些感受及防踩坑经验(getActivity、getDialog为空,cancelable无效等)
随机推荐
mysql 5.1升级到5.69
MySQL数据库讲解(九)
Operation instructions of star boundary automatic text translator (advanced version)
Essential difference between restful WebService and gSOAP webservice
mysql 5.1升级到5.68
连接公司跳板机取别名
什么是云迁移?云迁移的四种模式分别是?
Homebrew是什么?以及使用
报表FCRA考试题集及答案(错了11题)
Storage path of mod subscribed by starbound Creative Workshop at Star boundary
Nifi 快速安装及文件同步操作
win10自带Groove音乐不能播放CUE和APE文件的一种曲线救国办法,自己创建aimppack插件包,AIMP安装DSP插件
leetcode--357. Count the number of different figures
logback-logger和root
mysql 5.1升级到5.67
帆软中需要设置合计值为0时,一整行都不显示的解决办法
findstr不是内部或外部命令解决方法
关于Jmeter启动闪退问题
Logback logger and root
Some good articles on pthread multithreading