5 条题解
- 
  0
#include <bits/stdc++.h> using namespace std; const int N = 3e3 + 10; int n,a[N]; bool v[N]; int main(){ while(cin >> n){ memset(v,0,sizeof(v)); int sum = 0; cin >> a[1]; for(int i = 2;i <= n;i++){ cin >> a[i]; if(abs(a[i] - a[i - 1]) < n && v[abs(a[i] - a[i - 1])] == 0){ v[abs(a[i] - a[i - 1])] = 1; sum++; } } if(sum == n - 1){ cout << "Jolly" << endl; }else{ cout << "Not jolly" << endl; } } return 0; } 
信息
- ID
 - 1024
 - 时间
 - 1000ms
 - 内存
 - 128MiB
 - 难度
 - 8
 - 标签
 - 递交数
 - 830
 - 已通过
 - 129
 - 上传者