当前位置:网站首页>返回数组排序后下标
返回数组排序后下标
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
边栏推荐
- 基於CM管理的CDH集群集成Phoenix
- Visio installation error 1:1935 2: {XXXXXXXX
- HyperBDR云容灾V3.2.1版本发布|支持更多云平台,新增监控告警功能
- 服务器日志分析工具(识别,提取,合并,统计异常信息)
- Jmeter设置环境变量支持在任意终端目录输入jmeter直接启动
- JSP学习2
- Operation instructions of star boundary text automatic translator
- Installation and use of postman pit
- HyperMotion云迁移完成阿里云专有云产品生态集成认证
- MySQL数据库讲解(八)
猜你喜欢
随机推荐
Cdh6 based on CM management 3.2 cluster integration atlas 2 one
redis数据库讲解二(redis高可用、持久化、性能管理)
MySQL数据库讲解(七)
查询2013年到2021年的数据,只查询到2020的数据,遇到了这个问题所进行的解决办法
Mysql个人学习总结
On the problem of cliff growth of loss function in the process of training
RecyclerView高级使用(一)-侧滑删除的简单实现
星界边境Starbound创意工坊订阅的mod的存放路径
MySQL数据库讲解(九)
rsync+inotify远程同步
There is a mining virus in the server
JDBC details
Recyclerview advanced use (I) - simple implementation of sideslip deletion
RecyclerView细节研究-RecyclerView点击错位问题的探讨与修复
JSP学习2
JDBC详解
mysql 5.1升级到5.611
Jmeter设置环境变量支持在任意终端目录输入jmeter直接启动
Easyexcel读取excel表地理位置数据,按中文拼音排序
帆软中单元格中隔行变色以及数量大于100字体变大变红设置