#Lutece0508. 快乐的跳跃者
快乐的跳跃者
Migrated from Lutece 508 快乐的跳跃者
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
对于一个包含()个元素的整数序列,如果序列中相邻元素之差的绝对值取遍从到的所有整数,那么这个序列就叫做jolly jumper
。例如:1 4 2 3
就是一个jolly jumper
,因为相邻元素之差的绝对值分别为、、。写一个程序来判断一个序列是不是jolly jumper
。
Input
有组测试数据。输入的第一行是数据组数,其后每一行是一组测试数据。每行包含一个整数(),然后是个整数,表示一个输入序列。
Output
对于输入的每一行,输出一行Jolly
或者Not jolly
来表示它是否为jolly jumper
。
Samples
2
4 1 4 2 3
5 1 4 2 -1 6
Jolly
Not jolly
Resources
From UVa