At a company dinner, the drinking rule was that two colleagues of similar age clinked glasses of wine.

Each meal was attended by a different number of people, who listed their ages in an irregular order. Finally, the two oldest people clinked glasses and drink for the first time.

Write a function that takes an array of the ages of the people at the table, returns the ages of the two people who clinked their glasses for the first time, and returns it in order of smallest to largest.

example:
[1,5,87,45,8,8] -> [45,87]
[6,5,83,5,3,18] -> [18,83]

have fun~

The two of the oldest man need cheers的更多相关文章

  1. kinect (oldest one) (libfreenect with py_kinect) on linux ubuntu14.04 x64

    freenect libs Where is the resource? Here :P : https://github.com/OpenKinect/libfreenect To make sur ...

  2. The Sorrows of Young Werther

    The Sorrows of Young Werther J.W. von Goethe Thomas Carlyle and R.D. Boylan Edited by Nathen Haskell ...

  3. python瓦登尔湖词频统计

    #瓦登尔湖词频统计: import string path = 'D:/python3/Walden.txt' with open(path,'r',encoding= 'utf-8') as tex ...

  4. NCE2

    1.A private conversation Last week I went to the theatre. I had a very good seat. The play was very ...

  5. Download Visual Studio

    Welcome to a new way to install Visual Studio! In our newest version, we've made it easier for you t ...

  6. A1

    It’s surprising what you can find at the end of your garden. Wild flowers... and even smaller yet, i ...

  7. BumpMapping [转]

    http://fabiensanglard.net/bumpMapping/index.php Fabien Sanglard's Website Home About FAQ Email Rss T ...

  8. SDWebImage源码解读之SDWebImageCache(下)

    第六篇 前言 我们在SDWebImageCache(上)中了解了这个缓存类大概的功能是什么?那么接下来就要看看这些功能是如何实现的? 再次强调,不管是图片的缓存还是其他各种不同形式的缓存,在原理上都极 ...

  9. ucos实时操作系统学习笔记——任务间通信(队列)

    ucos操作系统中的queue机制同样使用了event机制来实现,其实和前面的sem,mutex实现类似,所不同的是对sem而言,任务想获得信号量,对mutex而言,任务想获得的是互斥锁.任务间通信的 ...

随机推荐

  1. nmon2influxdb+grafana:服务监控可视化部署

    在工作中,无论是定位线上问题,还是性能优化,都需要对前端.后台服务进行监控.而及时的获取监控数据,能更好的帮助技术人员排查定位问题. 前面的博客介绍过服务端监控工具:Nmon使用方法及利用easyNm ...

  2. WPF 获取元素(Visual)相对于屏幕设备的缩放比例,可用于清晰显示图片

    原文:WPF 获取元素(Visual)相对于屏幕设备的缩放比例,可用于清晰显示图片 我们知道,在 WPF 中的坐标单位不是屏幕像素单位,所以如果需要知道某个控件的像素尺寸,以便做一些与屏幕像素尺寸相关 ...

  3. MongoDB和Java(3):Java操作MongoB

    最近花了一些时间学习了下MongoDB数据库,感觉还是比较全面系统的,涉及了软件安装.客户端操作.安全认证.副本集和分布式集群搭建,以及使用Spring Data连接MongoDB进行数据操作,收获很 ...

  4. 编程风格统一配置EditorConfig

    EditorConfig 以纯原生无需任何插件支持 EditorConfig 代码风格配置的编辑器: Visual Studio 2017 开始添加了对 EditorConfig 的原生支持.Visu ...

  5. Linux 各系统目录作用及内容

  6. js正则表达式验证、匹配数字、匹配字符串、匹配中文、匹配任意字符备忘录

    本文转自:91博客 :原文地址:http://www.9191boke.com/235792704.html 正则表达式或“regex”用于匹配字符串的各个部分,下面是我创建正则表达式的备忘录.包括一 ...

  7. 【Django2.0】python manage.py makemigrations 和 python manage.py migrate的区别

    无论当我们第一次在models.py中创建类对象还是对类中的属性进行修改,我们都会使用python manage.py makemigrations 和 python manage.py migrat ...

  8. PAT甲级1007题解——贪心

    题目分析:对于每一个点来说,如果选择合并入包含前一个点的序列那么只有在前一个点的序列不为负数(这里指的是包含前一个位置的数的一个连续序列的和不为负数),当前点才会将自己也加入这个子序列,否则,当前点则 ...

  9. 项目Alpha冲刺--9/10

    项目Alpha冲刺--9/10 作业要求 这个作业属于哪个课程 软件工程1916-W(福州大学) 这个作业要求在哪里 项目Alpha冲刺 团队名称 基于云的胜利冲锋队 项目名称 云评:高校学生成绩综合 ...

  10. 深度学习Keras框架笔记之AutoEncoder类

    深度学习Keras框架笔记之AutoEncoder类使用笔记 keras.layers.core.AutoEncoder(encoder, decoder,output_reconstruction= ...