The two of the oldest man need cheers
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的更多相关文章
- 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 ...
- The Sorrows of Young Werther
The Sorrows of Young Werther J.W. von Goethe Thomas Carlyle and R.D. Boylan Edited by Nathen Haskell ...
- python瓦登尔湖词频统计
#瓦登尔湖词频统计: import string path = 'D:/python3/Walden.txt' with open(path,'r',encoding= 'utf-8') as tex ...
- NCE2
1.A private conversation Last week I went to the theatre. I had a very good seat. The play was very ...
- Download Visual Studio
Welcome to a new way to install Visual Studio! In our newest version, we've made it easier for you t ...
- A1
It’s surprising what you can find at the end of your garden. Wild flowers... and even smaller yet, i ...
- BumpMapping [转]
http://fabiensanglard.net/bumpMapping/index.php Fabien Sanglard's Website Home About FAQ Email Rss T ...
- SDWebImage源码解读之SDWebImageCache(下)
第六篇 前言 我们在SDWebImageCache(上)中了解了这个缓存类大概的功能是什么?那么接下来就要看看这些功能是如何实现的? 再次强调,不管是图片的缓存还是其他各种不同形式的缓存,在原理上都极 ...
- ucos实时操作系统学习笔记——任务间通信(队列)
ucos操作系统中的queue机制同样使用了event机制来实现,其实和前面的sem,mutex实现类似,所不同的是对sem而言,任务想获得信号量,对mutex而言,任务想获得的是互斥锁.任务间通信的 ...
随机推荐
- ubuntu supervisor管理uwsgi+nginx
一.概述 superviosr是一个Linux/Unix系统上的进程监控工具,他/她upervisor是一个Python开发的通用的进程管理程序,可以管理和监控Linux上面的进程,能将一个普通的命令 ...
- 【1】【leetcode-72 动态规划】 编辑距离
(没思路,很典型,重要) 给定两个单词 word1 和 word2,计算出将 word1 转换成 word2 所使用的最少操作数 . 你可以对一个单词进行如下三种操作: 插入一个字符 删除一个字符 替 ...
- Drools 规则文件语法概述
概述(Overview) 以.drl为扩展名的文件,是Drools中的规则文件,规则文件的编写,遵循Drools规则语法.下面详细介绍一下Drools规则文件语法.具体参考官方文档: https:// ...
- C#服务器全面讲解与制作
C#服务器全面讲解与制作一 环境配置与基础架构 环境配置 基础的服务器架构 这里我会讲解高级的C#服务器的全面制作流程 会对大家有很大的帮助 不过在这个教程中主要是讲解服务器的制作,所以不会讲解客户端 ...
- ImportError: cannot import name Namespace
运行socketServer报错. 解决: pip uninstall python-socketio pip install python-socketio
- Java自学-控制流程 If
Java的 If 条件语句 条件判断 示例 1 : if if(表达式1){ 表达式2: } 如果表达式1的值是true, 就执行表达式2 public class HelloWorld { publ ...
- Python Socket Programming UDP/TCP
基于UDP/TCP的套接字编程demo UDP 客户端/服务器 一个简单的基于UDP协议的客户端和服务器应用的进程通信. 逻辑: 客户端会给服务器发送小写的英文字母,服务器接受后,把它转化成大写再返回 ...
- 如何用JS获取地址栏参数的方法
采用正则表达式获取地址栏参数: 写一个方法来进行正则匹配,同样也可以复用 function GetPar(name) { var reg = new RegExp("(^|&)&qu ...
- CI框架结合jQuery实现上传多张图片即时显示
一.Html代码如下: <tr> <td class="txt_r"><span class="orange">* < ...
- tmp-scmj
1.apk下载 http://app6.wpf2x4.cn/?downloadfrom=sichuan 麻将图: Big_mahjonghn_tiles_sr.png