CF357A Group of Students

题目描述

有一些学生考了试,他们在考试中获得了$1$~$m$的分数,获得 i 分的有 $C_i$人。\ 你需要求出一个分数线,满足低于分数线的人数和高于分数线(含)的人数均在$[x,y]$范围之内

输入格式

------------ 第一行一个整数,$m$\ 第二行$m$个整数,为$C_1$~$C_m$ 第三行两个整数$x,y$

输出格式

------------ 输出分数线,特别的,若没有满足要求的分数线,输出0

说明/提示

In the first sample the beginner group has 7 students, the intermediate group has 6 of them. In the second sample another correct answer is 3.