博客
关于我
PTA L1-027 出租 (20 分)
阅读量:282 次
发布时间:2019-03-01

本文共 1173 字,大约阅读时间需要 3 分钟。

?????????????

????????????????????????????????????????????????????arr?index?arr???????????????index????????????

?????arr??????????????????????index?????????????????????????????18013820100?arr????8,3,2,1,0??index?????3,0,4,3,1,0,2,4,3,4,4?

???????????????????????11?????????????????????????????

  • ????????????????arr???
  • ????????index??
  • ??arr?index?????
  • ???????????

    #include 
    #include
    #include
    #include
    using namespace std;int main() { string s; while (cin >> s) { vector
    a(11), b(11); for (int i = 0; i < 11; ++i) { a[i] = s[i] - '0'; b[i] = i; } sort(a.begin(), a.end(), greater
    ()); for (int i = 0; i < 11; ++i) { if (find(b.begin(), b.end(), a[i]) != b.end()) { b.erase(find(b.begin(), b.end(), a[i]), 1); } } cout << "int[] arr = new int[" << arr.size() << "][" << arr << "];" << endl; cout << "int[] index = new int[" << b.size() << "][" << b << "];" << endl; } return 0;}

    ??????????????????????????arr?index??????????????????????a?????a??????????????????????index??????????????????????????????????????

    转载地址:http://qrvo.baihongyu.com/

    你可能感兴趣的文章
    Netwox网络工具使用详解
    查看>>
    Net与Flex入门
    查看>>
    net包之IPConn
    查看>>
    Net操作配置文件(Web.config|App.config)通用类
    查看>>
    Neutron系列 : Neutron OVS OpenFlow 流表 和 L2 Population(7)
    查看>>
    New Relic——手机应用app开发达人的福利立即就到啦!
    查看>>
    NFinal学习笔记 02—NFinalBuild
    查看>>
    NFS
    查看>>
    NFS Server及Client配置与挂载详解
    查看>>
    NFS共享文件系统搭建
    查看>>
    nfs复习
    查看>>
    NFS安装配置
    查看>>
    NFS的安装以及windows/linux挂载linux网络文件系统NFS
    查看>>
    NFS的常用挂载参数
    查看>>
    NFS网络文件系统
    查看>>
    nft文件传输_利用remoting实现文件传输-.NET教程,远程及网络应用
    查看>>
    NFV商用可行新华三vBRAS方案实践验证
    查看>>
    ng build --aot --prod生成文件报错
    查看>>
    ng 指令的自定义、使用
    查看>>
    nghttp3使用指南
    查看>>