Submit solution

Points:
5 (partial)

Time limit:
2.0s

Memory limit:
256M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Molly loves subtraction. She also loves non-negative numbers. For her birthday, Molly received an array of integers. To make up for the fact that you forgot to bring her a present, you decide to tell her the minimum value of such that , such that .

#### Subtasks

For all subtasks, .

##### Subtask 1 [40%]

##### Subtask 2 [60%]

#### Input Specification

Line : An integer, .

Line : space separated integers, the array .

#### Output Specification

The minimum value of .

#### Sample Input

```
5
21 -10 7 3 18
```

#### Sample Output

`3`

## Comments

its |i - j| >= 0 not i and j >= 0 btw

what should i do if i keep getting TLE in Batch #3, using JAVA..... Thanks

Use BufferedReader

Thanks :-)

Hint for Python Coders getting TLE: Use

`PyPy`

instead.