mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-27 20:16:29 +00:00
26 lines
450 B
C++
26 lines
450 B
C++
// R38820772
|
|
|
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
bool cnt[10000005];
|
|
int n, a[1005];
|
|
|
|
int main() {
|
|
cin >> n;
|
|
for (int i = 0; i < n; i++) {
|
|
cin >> a[i];
|
|
}
|
|
for (int i = 1; i < n; i++) {
|
|
if (!cnt[abs(a[i] - a[i - 1])]) {
|
|
cnt[abs(a[i] - a[i - 1])] = true;
|
|
} else {
|
|
cout << "Not jolly" << endl;
|
|
return 0;
|
|
}
|
|
}
|
|
cout << "Jolly" << endl;
|
|
return 0;
|
|
}
|