0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

P1152 欢乐的跳

R38820772
This commit is contained in:
Baoshuo Ren 2020-09-24 19:17:57 +08:00 committed by Baoshuo Ren
parent b3de41de23
commit 7eab5ffb7f
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

25
problem/P1152/P1152.cpp Normal file
View File

@ -0,0 +1,25 @@
// 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;
}