跳到正文

题解

题解 P1152 【欢乐的跳】

NefeliOwO约 1 分钟
原文
文章信息与版本

文章信息

发布
2019年6月26日
收录
2026年8月12日
更新
2026年11月17日
篇幅
约 1 分钟
题目
P1152

版本

  1. v1当前

include<bits/stdc++.h>

using namespace std; int n[100001]; int m,temp,a=0; int main(){ cin>>m; cin>>n[0]; for(int i=1;i<m;i++){ cin>>n[i]; temp=abs(n[i-1]-n[i]); for(int j=1;j<m;j++){ if(temp==j){ a++; } }

代码
}
if(a==m-1) cout<<"Jolly";
else cout<<"Not jolly";
return 0;

}

原文