Change the ball--hdu2277
Change the ball
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 581 Accepted Submission(s): 201
Garfield is not able to estimate the minimal steps to achieve the aim. Can you tell him?
#include <stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int a[];
while(scanf("%d%d%d",&a[],&a[],&a[])!=EOF)
{
sort(a+,a+);//保证从小到大排序!
if(a[]==a[]||(a[]-a[])%==)
printf("%d\n",a[]);
else if(a[]==a[]||a[]==a[]||(a[]-a[])%==||(a[]-a[])%==)
printf("%d\n",a[]);
else
printf("):\n");
}
return ;
}
Change the ball--hdu2277的更多相关文章
- HDU 2277 Change the ball
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2277 Change the ball Time Limit: 2000/1000 MS (Java/O ...
- hdoj 2277 Change the ball【找规律】
Change the ball Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- Change the ball(找规律)
Change the ball Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- Linux---弹球游戏
ReadMe: 弹球游戏按键说明(注意大小写): Q End Up Game 游戏停止 P Play Again 再玩一次 f 速度x轴方向减速 s 速度x轴方向加速 F 速度y轴方向减速 S 速度 ...
- pygame系列_小球完全弹性碰撞游戏
之前做了一个基于python的tkinter的小球完全碰撞游戏: 今天利用业余时间,写了一个功能要强大一些的小球完全碰撞游戏: 游戏名称: 小球完全弹性碰撞游戏规则: 1.游戏初始化的时候,有5个不同 ...
- pygame系列_小球完全弹性碰撞游戏_源码下载
之前做了一个基于python的tkinter的小球完全碰撞游戏: python开发_tkinter_小球完全弹性碰撞游戏_源码下载 今天利用业余时间,写了一个功能要强大一些的小球完全碰撞游戏: 游戏名 ...
- HDU 5821 Ball (贪心)
Ball 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5821 Description ZZX has a sequence of boxes nu ...
- 16 多校 8 Ball (贪心排序)很巧妙的思路啊~
ZZX has a sequence of boxes numbered 1,2,...,n1,2,...,n. Each box can contain at most one ball. You ...
- hdu 5821 Ball 贪心
Ball 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5821 Description ZZX has a sequence of boxes nu ...
随机推荐
- Glide 加载图片背景变绿
解决方案: Glide.with(mContext).load(url).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(imageView);
- [Head First Python]2. BIF(内置函数)
1- range() >>> for each in range(2): print(each) ... 0 1
- python快速搭建WebServer
#!/usr/bin/python import SimpleHTTPServer import SocketServer import os PORT = 7777 WEBDIR = "/ ...
- NAS4Free 安装配置 -- 目录
淘了个DIY的NAS主机,装了3块硬盘,安装配置NAS4Free,用来存储照片.电影等资料,并兼做下载机. 现在把拆箱.安装.配置过程记录下来,供有兴趣的同学参考. NAS4Free 安装配置(一)开 ...
- Meteor Shower(POJ 3669)
Meteor Shower Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12816 Accepted: 3451 De ...
- innobackupex 使用说明
1.创建备份相关用户 '; grant reload,lock tables,replication client,process,super on *.* to 'backuper'@'127.0. ...
- java通过jdbc连接mysql数据库
下载mysql驱动包: http://dev.mysql.com/downloads/file.php?id=456317 解压之后里面有个mysql-connector-java-5.1.35-bi ...
- Qt 自定义事件详细实例(继承QEvent,然后QCoreApplication::postEvent()、sendEvent())
创建用户事件 创建一个自定义类型的事件,首先需要有一个事件号,其值通常大于QEvent::User.为了传递事件信息,因此必须编写自定义的事件类,该事件类从QEvent继承. 编写用户事件:编写用户事 ...
- C# dynamic类型
dynamic类型是C#4.0中引入的新类型,它允许其操作掠过编译器类型检查,而在运行时处理.dynami类型在绝大多数情况下和object类型相似,不同之处在于编译器对于包含了dynamic的表达式 ...
- 【转】如何定制android源码的编译选项 & 后期安装? ---- 不错
原文网址:http://blog.sina.com.cn/s/blog_3e3fcadd0100z3o9.html Android编译过程比较长,配置起来也很麻烦.现仅就工作遇到的问题做个总结.所用硬 ...