登录
首页 » c » 中间数

中间数

于 2022-09-17 发布 文件大小:43.51 kB
0 154
下载积分: 2 下载次数: 1

代码说明:

问题描述 在一个整数序列A1, A2, …, An中,如果存在某个数,大于它的整数数量等于小于它的整数数量,则称其为中间数。 在一个序列中,可能存在多个下标不相同的中间数,这些中间数的值是相同的。 给定一个整数序列,请找出这个整数序列的中间数的值。 输入说明 输入的第一行包含了一个整数n,表示整数序列中数的个数,1 ≤ n ≤ 1000。 第二行包含n个正整数,依次表示A1, A2, …,An,1 ≤ Ai ≤ 1000。 输出说明 如果序列的中间数存在,则输出中间数的值,否则输出-1表示不存在中间数。 输入样例 输入样例1 6 2 6 5 6 3 5 输入样例2 4 3 4 6 7 输出样例 输出样例1 5 输出样例2 -1

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • BC_HVAC
    BC_HVAC一个LNC DDE的例程,很值得下载(LNC DDE a BC_HVAC the routine, it is worth downloading)
    2009-06-22 16:35:53下载
    积分:1
  • 韦根信号转换
    Wiegand 26/34转RS485、RS232信号转换模块(原理图+PCB+BOM),输入韦根信号,转换为串口输出(Wiegand 26/34 to RS485, RS232 signal conversion module (schematic + PCB + BOM), input Wiegand signal, converted to serial output)
    2020-06-25 04:20:01下载
    积分:1
  • TrackBar
    c# 控件美化, 重写 track bar (track bar override)
    2011-09-25 14:15:10下载
    积分:1
  • 33
    说明:  如何给EA自定义交易商,限制EA交易的时间(How to customize the dealer to EA and limit the transaction time)
    2017-10-23 11:42:48下载
    积分:1
  • tcp ip DATA 用VS。NET的例子
    tcp ip DATA 用VS。NET的例子-tcp ip with VS.NET example
    2022-02-02 04:32:55下载
    积分:1
  • 103Server
    辅助通讯规约测试的程序,支持串口103规约,可以模拟四方、南瑞等厂家的保护装置,通过修改配置文件,可以对应保护的点号及实际值。(Auxiliary communication protocol testing procedures, supporting serial 103 of the Statute, can simulate the Quartet, NARI and other manufacturers of protective devices, by modifying the configuration file, you can protect the dot and the corresponding actual values.)
    2021-05-09 23:58:34下载
    积分:1
  • RTKlib关于高精度GPS动态定位函数与处理过程整理
    精密GPS动态测量采用载波相位差分技术,其标准测量模式为,一台GPS接收机置于已知点,作为基准站来进行静态测量,另一台GPS接收机置于载体上,作为流动站来进行动态测量。两台接收机同步观测相同的卫星,然后将两台GPS接收机的观测值进行组合处理,就可以获得流动站相对于基准站的坐标和速度。本文主要介绍用RTKLIB 实现精密动态定位的过程,该过程包括观测文件和导航文件的读取、基准站位置的计算、流动站位置的求解、运行结果的输出,下面将分块讨论。(Precision GPS dynamic measurement using carrier phase difference technology, the standard measurement mode, a GPS receiver placed at a known point, as a base station for static measurement, another GPS receiver placed on the carrier, as a mobile station Perform dynamic measurements. The two satellites simultaneously observe the same satellite and then combine the observations of the two GPS receivers to obtain the coordinates and speed of the rover relative to the base station. This paper mainly introduces the process of realizing dynamic dynamic positioning with RTKLIB. The process includes reading the observation file and navigation file, calculating the base station position, solving the position of the mobile station, and outputting the result of the operation.)
    2017-09-21 16:48:09下载
    积分:1
  • AccessGraphObjectsTutorial
    用Origin C, 操作origin 中的Graph对象。(Using Origin C to access the graph object in origin.)
    2012-09-20 22:04:37下载
    积分:1
  • bestFitDecrease
    本代码,直接编译可用,解决NP难问题使用的是局部最优BFD算法,其中用到了链表以及大顶堆排序算法(This code can be compiled directly, and it can solve the NP hard problem. It uses the local optimal BFD algorithm, which uses the linked list and the big stack sort algorithm.)
    2018-07-19 11:23:22下载
    积分:1
  • shu
    大学软件工程数据结构课程设计二叉树实验三种遍历方法(curriculum design,structure data)
    2017-11-10 13:44:35下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载