当前位置:网站首页>返回数组排序后下标
返回数组排序后下标
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
边栏推荐
- redis数据库讲解(三)redis数据类型
- 政务云迁移实践 北明数科使用HyperMotion云迁移产品为某政府单位实施上云迁移项目,15天内完成近百套主机迁移
- 教育行业云迁移最佳实践:海云捷迅使用HyperMotion云迁移产品为北京某大学实施渐进式迁移,成功率100%
- 云迁移的六大场景
- Use of WiFi module based on wechat applet
- 基于CM管理的CDH集群集成Phoenix
- 不同时间类型的执行计划计算
- RobotFramework 之 项目框架
- OpenStack如何跨版本升级
- Can I compile the header file and source file of the template separately
猜你喜欢
随机推荐
jsp学习1
Operation instructions of star boundary automatic text translator (advanced version)
openstack理论知识
星界边境Starbound创意工坊订阅的mod的存放路径
VMware15Pro在Deepin系统里面挂载真机电脑硬盘
Request module
On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
在MAC上安装mysql
使用Postman进行Mock测试
多云数据流转?云上容灾?年前最后的价值内容分享
Mysql个人学习总结
Use of WiFi module based on wechat applet
findstr不是内部或外部命令解决方法
01-NIO基础之ByteBuffer和FileChannel
postman批量生产body信息(实现批量修改数据)
如何快速批量创建文本文档?
Three point positioning based on ibeacons (wechat applet)
Recyclerview advanced use (I) - simple implementation of sideslip deletion
报表FCRA考试题集及答案(错了11题)
Redis数据库讲解(一)









