#C7906. Smallest Absolute Difference
Smallest Absolute Difference
Smallest Absolute Difference
Given a list of integers representing time points, your task is to compute the smallest absolute difference between any two distinct time points. The absolute difference between two points \(x\) and \(y\) is defined as \(\lvert x - y \rvert\). This problem can be efficiently solved by sorting the list and then scanning through consecutive elements.
inputFormat
The input is given via standard input (stdin) with the following format:
The first line contains an integer \(n\), representing the number of time points.
The second line contains \(n\) space-separated integers, each representing a time point.
outputFormat
Output a single integer to standard output (stdout) which is the smallest absolute difference between any two distinct time points.
## sample5
3 8 15 1 6
2