#C3437. Second Minimum Finder
Second Minimum Finder
Second Minimum Finder
Given an array of integers, your task is to find the second minimum value, i.e. the second smallest unique element in the array. Formally, if the array is denoted by \( A \), you are required to find \( A_{(2)} \) such that \( A_{(2)} \) is the second smallest element among the distinct elements in \( A \). If the array is None
or contains less than two unique elements, output None
.
inputFormat
The input is given via standard input as a single line. If the input is exactly None
, then the array is considered to be null. Otherwise, the line contains space-separated integers representing the elements in the array.
outputFormat
Output the second smallest unique integer from the array. If no such element exists, output None
.
3 1 4 1 5 9 2
2