我的 CODE
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
int a[n + 1], b[n];
for (int i = 0; i <= n - 1; i++)
b[i] = 0;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 1; i <= n - 1; i++) {
if (abs(a[i] - a[i + 1]) >= n) {
cout << "Not jolly";
}
b[abs(a[i] - a[i + 1])]++;
if (b[abs(a[i] - a[i + 1])] > 1) {
cout << "Not jolly";
}
}
cout << "Jolly";
return 0;
}
我是C语言小佬
好了好了,话归正题( ̄▽ ̄)
有没有dalao帮助一下
没有关注
玄关