当前位置:网站首页>返回数组排序后下标
返回数组排序后下标
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
边栏推荐
猜你喜欢
Subscription number development of wechat applet (message push)
VMWare安装64位XP中文教程
连接公司跳板机取别名
On the multi-level certificate based on OpenSSL, the issuance and management of multi-level Ca, and two-way authentication
RobotFramework 之 用例标签机制
RecyclerView进阶使用-实现仿支付宝菜单编辑页面拖拽功能
RecyclerView高级使用(一)-侧滑删除的简单实现
VMware15Pro在Deepin系统里面挂载真机电脑硬盘
VMware installation 64 bit XP Chinese tutorial
倒计时1天~2022云容灾产品线上发布会即将开始
随机推荐
Installation and use of postman pit
DeepinV20安装Mariadb
Logback logger and root
Indoor and outdoor map switching (indoor three-point positioning based on ibeacons)
云容灾是什么意思?云容灾和传统容灾的区别?
JDBC详解
关于NodeJS中JSON5的相关配置和使用
openstack理论知识
RobotFramework 之 用例标签机制
Postman的安装使用及填坑心得
预览CSV文件
云迁移的六大场景
HyperBDR云容灾V3.2.1版本发布|支持更多云平台,新增监控告警功能
Request module
Logging module
There is a mining virus in the server
Jira截取全图
帆软报表设置单元格填报以及根据值的大小进行排名方法
JDBC和servlet写CRUD的接口总结
Wechat applet initializes Bluetooth, searches nearby Bluetooth devices and connects designated Bluetooth (I)