429. Missing Ranges
EasyArray
All numbers lie in [lower, upper] and are sorted and distinct. Print the missing ranges in the same format as Summary Ranges, or NONE.
Input format
Line 1: n lower upper Line 2: n integers (may be empty)
Output format
The missing ranges or NONE.
Example 1
Input
5 0 99 0 1 3 50 75
Output
2 4->49 51->74 76->99
Example 2
Input
0 1 1
Output
1
Constraints
0 ≤ n ≤ 10⁴
Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.
Loading the MyLoginn IDE…