导读 关于有趣的跳跃这个问题很多朋友还不知道,今天小六来为大家解答以上的问题,现在让我们一起来看看吧!1、 include include include includ
关于有趣的跳跃这个问题很多朋友还不知道,今天小六来为大家解答以上的问题,现在让我们一起来看看吧!
1、#include#include#include#include#include#include#includeusing namespace std;const int maxn=3110;int main(){ int n,a[maxn],b[maxn]; cin>>n; if(n==1) { cout<<"Jolly"; return 0; } int tot=0; memset(a,0,sizeof(a));memset(b,0,sizeof(b)); for(int i=1;i<=n;i++) { cin>>a[i]; } for(int i=1;i()); for(int i=1;i#include using namespace std; int main(){ int n,cnt; bool flag; while(cin>>n) { flag = true; cnt = 0; int *p = new int[n]; int *q = new int[n]; for(int i = 0;i != n;++ i) { cin>>p[i]; } for(int i = n - 1;i != 0;-- i) { q[i] = abs(p[i] - p[i - 1]); if(q[i] == 0) { cnt ++; } } if(cnt == n - 1) { cout<<"jolly"<#include#includeusing namespace std;int a[110000],b[100001];int main(){int n,i,m=0,p=1;scanf("%d",&n);if(n==1){printf("Jolly");return 0;}for(i=1;i<=n;i++)scanf("%d",&a[i]);for(i=1;i#include using namespace std; int main(){ int n,cnt; bool flag; while(cin>>n) { flag = true; cnt = 0; int *p = new int[n]; int *q = new int[n]; for(int i = 0;i != n;++ i) { cin>>p[i]; } for(int i = n - 1;i != 0;-- i) { q[i] = abs(p[i] - p[i - 1]); if(q[i] == 0) { cnt ++; } } if(cnt == n - 1) { cout<<"jolly"< #include #include using namespace std; int main() { int n, last, current, a[3001]={0}; cin >> n; cin >> last; for (int i=1; i> current; a[abs(current-last)]++; last = current; } for (int i=1; i #include #include #include #include #include #include using namespace std; const int maxn=3110; int main() { int n,a[maxn],b[maxn]; cin>>n; if(n==1) { cout<<"Jolly"; return 0; } int tot=0; memset(a,0,sizeof(a));memset(b,0,sizeof(b)); for(int i=1;i<=n;i++) { cin>>a[i]; } for(int i=1;i()); for(int i=1;i本文分享完毕,希望对大家有所帮助。
标签:
免责声明:本文由用户上传,如有侵权请联系删除!