登录
首页 » c » 中间数

中间数

于 2022-09-17 发布 文件大小:43.51 kB
0 140
下载积分: 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 个回复

  • 123
    说明:  操作1.54中景园OLED显示屏,基于STM32的ARM处理器(Operate 1.54 Zhongjing Garden OLED Display Screen)
    2018-12-29 17:11:38下载
    积分:1
  • 操作系统的原设计程序,其中有些是错误的,我们要帮助陈…
    os设计的原程序 ,其中有一些错误,希望大家帮忙-os the original design procedures, some of which are wrong, we want to help change it
    2022-03-15 07:45:58下载
    积分:1
  • MPU6050
    本程序实现如下功能:开机后,先初始化MPU6050等外设,然后利用DMP库,初始化MPU6050及使能DMP,最后,在死循环里面不停读取:温度传感器、加速度传感器、陀螺仪、DMP姿态解算后的欧拉角等数据,通过串口上报给上位机(温度不上报),利用上位机软件(ANO_Tech匿名四轴上位机_V2.6.exe),可以实时显示MPU6050的传感器状态曲线,并显示3D姿态,可以通过KEY0按键开启/关闭数据上传功能。同时,在LCD模块上面显示温度和欧拉角等信息。DS0来指示程序正在运行。(This program implements the following functions: boot, first initialize MPU6050 and other peripherals, and then use the DMP library initialization MPU6050 and enable DMP, finally, in an endless loop which constantly reads: temperature sensors, acceleration sensors, gyroscopes, DMP attitude Euler angles and other data solver after reporting to the host computer through the serial port (temperature does not report) using PC software (ANO_Tech anonymous axis PC _V2.6.exe), it can display MPU6050 sensor status in real-time curve, and displaying 3D gesture by KEY0 button on/off data uploading. Meanwhile, in the LCD display above the module temperature and other information Euler angles. DS0 to indicate that the program is running.)
    2016-03-17 17:55:43下载
    积分:1
  • 用OpenCV编写简单的视频捕捉
    本代码主要用于视频捕捉,可以通过OpenCV捕捉一个视频的画面,非常实用......很适合初学者学习,并且易于掌握。
    2022-01-26 00:19:13下载
    积分:1
  • sql语句添加或删除引号
    应用背景可以对sql语句进行添加或者删除引号,方便程序中写sql语句关键技术正则表达式。sql语句到程序中拼SQL语句
    2022-05-25 11:54:44下载
    积分:1
  • testMySocket
    监控示例,我们学校的课程设计的示例系统。希望能采纳!(this is a file foe deal to photos.my name is li wen xiang,today I want to download this source file.)
    2012-06-11 10:13:00下载
    积分:1
  • collision
    opengl编写的干涉碰撞检测的例子,适合进行游戏开发的朋友看(opengl prepared examples of interference in collision detection, suitable for game developers to see friends)
    2007-12-07 17:05:44下载
    积分:1
  • db-5.2.36.tar
    伯克利 DB 可以开发的自定义数据管理解决方案(Berkeley DB enables the development of custom data management solutions )
    2013-01-03 17:10:48下载
    积分:1
  • passTp
    过DNF游戏保护TP的双机调试 先加载驱动,再开启游戏,windbg不会断开,可以继续通信,调试(Over the two-machine debugging DNF game protection TP is loaded first drive, and then turn on the game, windbg will not disconnect, communication can continue debugging)
    2020-11-12 19:59:43下载
    积分:1
  • c++N皇后问题,基于easyx图形库的结果显示
    一种N皇后问题搜索的C++实现,运行结果可用图形直观的展现出来,基于easyx图形库,简单易学。
    2022-12-30 05:45:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载