time limit per test 2 seconds

memory limit per test 256 megabytes

input standard input

output standard output

This year, as in previous years, MemSQL is inviting the top 25 competitors from the Start[c]up qualification round to compete onsite for the final round. Not everyone who is eligible to compete onsite can afford to travel to the office, though. Initially the top 25 contestants are invited to come onsite. Each eligible contestant must either accept or decline the invitation. Whenever a contestant declines, the highest ranked contestant not yet invited is invited to take the place of the one that declined. This continues until 25 contestants have accepted invitations.

After the qualifying round completes, you know K of the onsite finalists, as well as their qualifying ranks (which start at 1, there are no ties). Determine the minimum possible number of contestants that declined the invitation to compete onsite in the final round.

Input

The first line of input contains K (1 ≤ K ≤ 25), the number of onsite finalists you know. The second line of input contains r1, r2, ..., rK(1 ≤ ri ≤ 106), the qualifying ranks of the finalists you know. All these ranks are distinct.

Output

Print the minimum possible number of contestants that declined the invitation to compete onsite.

Examples

input

25
2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 28

output

3

input

5
16 23 8 15 4

output

0

input

3
14 15 92

output

67

Note

In the first example, you know all 25 onsite finalists. The contestants who ranked 1-st, 13-th, and 27-th must have declined, so the answer is 3.

【翻译】一场比赛本来只选择排名前25位的人进入决赛。但是这些人可以有人弃权,如果一个人弃权,那么就在剩下没有入围的人中选出最高分并邀请他参加决赛。当然这个人也可以拒绝,那么就要一直重复上述过程。给出n个人的排名(1<=n<=25),且这n个人都进入决赛了,请求出满足这些人进决赛,最少有多少个人拒绝参加决赛。

题解:
     ①题意很难懂。

     ②转化后问题:给出n个数,求最大值,如果最大值大于25输出最大值-25的值,否则输出0。

#include<stdio.h>
using namespace std;
int n,a,b;
int main()
{
scanf("%d",&n);
while(n--)scanf("%d",&b),a=a<b?b:a;
printf("%d",a<25?0:a-25);return 0;
}//Paul_Guderian

【CF MEMSQL 3.0 A. Declined Finalists】的更多相关文章

  1. 【CF MEMSQL 3.0 E. Desk Disorder】

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  2. 【CF MEMSQL 3.0 C. Pie Rules】

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  3. 【CF MEMSQL 3.0 D. Third Month Insanity】

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  4. 【CF MEMSQL 3.0 B. Lazy Security Guard】

    time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standa ...

  5. 【CF edu 27 G. Shortest Path Problem?】

    time limit per test 3 seconds memory limit per test 512 megabytes input standard input output standa ...

  6. 【CF Round 439 E. The Untended Antiquity】

    time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standa ...

  7. 【CF Round 439 C. The Intriguing Obsession】

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  8. 【CF Round 439 B. The Eternal Immortality】

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  9. 【Magicodes.IE 2.0.0-beta1版本发布】已支持数据表格、列筛选器和Sheet拆分

    为了更好的完善Magicodes.IE,春节期间我们会进行一次大的重构.由于精力有限,急缺文档和翻译(将文档翻译为英文文档)支持,诚邀各位加入.同时在功能方便也做了相关规划,有兴趣的朋友可以参与提交P ...

随机推荐

  1. ElasticSearch : 基础

    #新建索引以及类型: PUT http://10.18.43.3:9200/test { "settings": { "number_of_shards": 3 ...

  2. Win7下如何安装python pygame的whl包

    看了小甲鱼的python教程,对那个python版本的打飞机游戏很感兴趣,尝试运行,居然报错了,提示缺少pygame包: 仔细一看需要安装一个pygame的包,默认安装好python是不包括这个包的, ...

  3. 做 JAVA 开发,怎能不用 IDEA!

    用了 IDEA,感觉不错.决定弃用 Eclipse 入门教程: www.cnblogs.com/yangyquin/p/5285272.html

  4. hive 学习系列二(数据库的创建删除修改) 拿走,不谢。

    database 相当于一个目录或者命名空间,用来更好地进行表的管理 在hdfs 的目录位置大致如下: [root@iZbp12vtv76y9q3d633bh6Z /]# hadoop fs -ls ...

  5. Windows使用Node.js自动生成Vue.js模版环境部署步骤-----记录

    node.js官网下载并安装node 进入node文档目录下,运行cmd 输入 node -v 查看node版本 出现表示安装完成 输入 npm -v 显示npm版本信息 安装cnpm 输入 npm ...

  6. 开通CSDN博客的原因

                                                                          为什么要写博客? 提供持续学习的动力 例如,我为自己设限每天 ...

  7. OpenCV代码提取:transpose函数的实现

    OpenCV中的transpose函数实现图像转置,公式为: 目前fbc_cv库中也实现了transpose函数,支持多通道,uchar和float两种数据类型,经测试,与OpenCV3.1结果完全一 ...

  8. express与ejs,ejs在Linux上面的路径问题

    1.学习使用ejs模板(这个是ejs.js) var express = require('express'); var app = express(); app.set("view eng ...

  9. adb 命令模拟按键事件

    转自:http://blog.csdn.net/jlminghui/article/details/39268419 例子:adb shell input keyevent 4 #这条命令相当于按了设 ...

  10. Qt Qpushbutton美化问题

    昨天在论坛看到一个网友的提问,如下 我想到的第一个就是可能需要重载Pushbutton,不过看到有网友回复可以使用stykesheet解决,今天尝试了一下,还是没有成功, 一下是我使用车重载的Push ...