60分,RE4个(#4,#5,#6,#8)
查看原帖
60分,RE4个(#4,#5,#6,#8)
606926
linxiaosong楼主2022/7/16 10:01
#include<iostream>
#include<cmath>
#include<algorithm>
int a[100000005];
using namespace std;
int main(){
	int t;
	int sum=0;
	while(cin>>t){
		int o=1;
		a[o]=abs(t);
		o++;
		sum++;
	}
	sort(a+1,a+sum+1);
	int flag=0;
	if(a[sum]>sum-1||a[1]<0){
		flag=1;
	}
	if(flag==1){
		cout<<"Not jolly";
	}
	else{
		cout<<"Jolly";
	}
	return 0;
}
2022/7/16 10:01
加载中...