zoj1879
来源:互联网 发布:java飞机大战源码 编辑:程序博客网 时间:2024/05/22 05:33
没啥说的
#include<stdio.h>#include<string.h>#include<math.h>#include<stdlib.h>int N;int main(){ int dif[3001]; int a,b,i; int flag; while(scanf("%d",&N)==1) { for(i=0;i<3000;i++) { dif[i]=0; } flag=1; scanf("%d",&a); if(N==1) { printf("Jolly\n"); continue; } for(i=2;i<=N;i++) { scanf("%d",&b); dif[abs(a-b)]=1; a=b; } for(i=1;i<=N-1;i++) { if(dif[i]!=1) { flag=0; } } if(flag) { printf("Jolly\n"); } else { printf("Not jolly\n"); } } return 0;}
- zoj1879
- zoj1879
- ZOJ1879
- zoj1879
- zoj1879
- zoj1879
- Windows 8 Consumer Preview Edition(resource download)
- Android 屏幕旋转后防止重新执行onCreate的方法。
- NSString 和NSData
- android 之DatePicker和TimePicker系列
- 如何查看Linux系统中逻辑和物理cpu的个数
- zoj1879
- eclipse里的python环境怎么导入urllib模块
- DB2 Architect Baseline
- hibernate连接oracle 11g的有关问题
- Effective C++读书笔记(24)
- hibernate怎么插入DB时间
- Android 去除标题栏
- 常用的命令笔记1
- 淘宝开放平台