UVa OJ 10038 - Jolly Jumpers
来源:互联网 发布:什么软件下载bt最快 编辑:程序博客网 时间:2024/05/09 08:34
也许是最简单的题目了。
1042119410038Jolly JumpersAcceptedC++0.0122012-08-02 05:45:19#include <iostream>#include<cstring>using namespace std;int abs(int a,int b){int c = a-b;if (c<0)c*=-1;return c;}int main(){int n;while(cin>>n){int seq[3000];memset(seq,0,sizeof(seq));int fir;int sec;cin>>fir;for (int i=1;i<=n-1;i++){cin>>sec;seq[abs(fir,sec)]=1;fir = sec;}int t=0;for (int i=1;i<=n-1;i++)t+=seq[i];if (t==n-1)cout<<"Jolly";elsecout<<"Not jolly";cout<<endl;}return 0;}
- UVa OJ 10038-Jolly Jumpers
- UVa OJ 10038 - Jolly Jumpers
- UVa 10038 Jolly Jumpers
- UVa 10038 - Jolly Jumpers
- uva 10038 Jolly Jumpers
- UVa 10038 - Jolly Jumpers
- UVa 10038 - Jolly Jumpers
- UVa 10038 Jolly Jumpers
- UVa 10038 Jolly Jumpers
- UVa Problem Solution: 10038 - Jolly Jumpers
- 10038 - Jolly Jumpers
- 10038 - Jolly Jumpers
- UVa Problem 10038 Jolly Jumpers (快乐的跳跃者)
- UVa 10038 / POJ 2575 / ZOJ 1879 Jolly Jumpers (water ver.)
- Jolly Jumpers
- jolly jumpers
- UvaOJ 10038 - Jolly Jumpers 题解以及代码
- fjnu 1532 Jolly Jumpers
- Codeigniter2学习笔记
- Android HAL(硬件抽象层)介绍以及调用
- Java 访问权限
- 玄幻小说
- Hibernate框架ORM的实现原理(资料)
- UVa OJ 10038 - Jolly Jumpers
- 2013年各大小IT公司待遇,绝对真实,一线数据!
- 实数范围内的求模(求余)运算:负数求余究竟怎么求
- 国外媒体推荐的5款当地Passbook通行证制作工具
- 工厂方法模式
- C++面试题
- 关于gcc, g++编译器的使用
- 《为什么编程是独一无二的职业》
- 数组重排,O(1)空间