시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 775 167 113 25.799%

문제

Jolly jumper라 불리는 수열이 있다. 이 수열은 n개의 연속된 두 수의 차의 절대값이 1부터 n-1까지 모두 나와야 한다. 예를 들어

1 4 2 3

이것은 Jolly jumper인데, 두 수의 차의 절대값이 각각 3,2,1이기 때문이다. 하여튼 조건을 충족하면 어느 수열이든 Jolly jumper라 할 수 있다. 이제 각 케이스마다 Jolly jumper인지를 판별하자.

입력

각 줄의 첫 수로 n이 주어진다.(n < 3000) 그 다음에는 n개의 수가 주어진다.

출력

각 줄마다 Jolly 인지 Not jolly 인지 출력한다.

예제 입력 1

4 1 4 2 3
5 1 4 2 -1 6

예제 출력 1

Jolly
Not jolly
W3sicHJvYmxlbV9pZCI6IjQzODMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM4MTBcdWQ1MDRcdWIyOTQgXHVjOTkwXHVhYzcwXHVjNmNjIiwiZGVzY3JpcHRpb24iOiI8cD5Kb2xseSBqdW1wZXJcdWI3N2MgXHViZDg4XHViOWFjXHViMjk0IFx1YzIxOFx1YzVmNFx1Yzc3NCBcdWM3ODhcdWIyZTQuIFx1Yzc3NCZuYnNwO1x1YzIxOFx1YzVmNFx1Yzc0MCBuXHVhYzFjXHVjNzU4IFx1YzVmMFx1YzE4ZFx1YjQxYyBcdWI0NTAgXHVjMjE4XHVjNzU4IFx1Y2MyOFx1Yzc1OCBcdWM4MDhcdWIzMDBcdWFjMTJcdWM3NzQgMVx1YmQ4MFx1ZDEzMCBuLTFcdWFlNGNcdWM5YzAgXHViYWE4XHViNDUwIFx1YjA5OFx1YzY0MFx1YzU3YyBcdWQ1NWNcdWIyZTQuIFx1YzYwOFx1Yjk3YyBcdWI0ZTRcdWM1YjQ8XC9wPlxyXG5cclxuPHA+MSA0IDIgMzxcL3A+XHJcblxyXG48cD5cdWM3NzRcdWFjODNcdWM3NDAmbmJzcDtKb2xseSBqdW1wZXJcdWM3Nz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V0IHNheWluZyAmcXVvdDtKb2xseSZxdW90OyBvciAmcXVvdDtOb3Qgam9sbHkmcXVvdDsuPFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > Waterloo's local Programming Contests > 30 September, 2000 C번

  • 잘못된 데이터를 찾은 사람: baekjoon
  • 문제를 번역한 사람: busyhuman