题目描述
Problem Description
An integer array with $n$ elements is considered to follow the "Jolly Jumpers" rule if the absolute differences between consecutive elements include all integers from $[1, n-1]$. For example, the array $\{1, 4, 2, 3\}$ follows the "Jolly Jumpers" rule because the absolute differences are: $3, 2, 1$.
Given an array, your task is to determine if it follows the "Jolly Jumpers" rule.
Input Format
Each test case starts with an integer $n (1 \le n \le 1000)$, followed by $n$ integers separated by spaces, all within the range $[-10^8, 10^8]$.
Output Format
For each test case, output one line. If the array follows the "Jolly Jumpers" rule, output Jolly; otherwise, output Not jolly.
Sample Input and Output
Input Sample #1
4 1 4 2 3
Output Sample #1
Jolly
Input Sample #2
5 1 4 2 -1 6
Output Sample #2
Not jolly
Notes
$1 \le n \le 1000$
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分