#CCBCHBON0000006. Dừng ở số vượt ngưỡng (Stop at the First Value Above Threshold)
Dừng ở số vượt ngưỡng (Stop at the First Value Above Threshold)
Stop at the First Value Above Threshold
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given threshold and a sequence of integers, print the first value strictly greater than , not its position. Print NONE if absent. Values after the first match do not affect the answer.
Input
The first line contains , then exactly integers. .
Output
The first value satisfying , or NONE.
Subtasks
-
Subtask 1 (20%): ; .
-
Subtask 2 (30%): ; .
-
Subtask 3 (50%): ; .
Examples
Example 1
Input:
5 6
1 6 7 9 10
Output:
7
Explanation:
Equality does not qualify; return the first strictly greater value.
Example 2
Input:
3 -2
-5 -2 0
Output:
0
Explanation:
Equality does not qualify; return the first strictly greater value.