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 ...
随机推荐
- IE6 双倍距BUG
IE6双倍距BUG的形成: 1.快元素 2.元素浮动 3.margin左右 解决方案:_display:inline;
- php在cli和cgi方式下获取服务器ip的实例
php cli方式下获取服务器ip php内核没有提供这样的命令,需要借助linux中的命令ifconfig来实现,如下两个函数代码: function getServerIp(){ ...
- python笔记之itertools模块
python笔记之itertools模块 itertools模块包含创建有效迭代器的函数,可以用各种方式对数据进行循环操作,此模块中的所有函数返回的迭代器都可以与for循环语句以及其他包含迭代器(如生 ...
- maven Spring MVC项目
IntelliJ IDEA上创建maven Spring MVC项目 各软件版本 利用maven骨架建立一个webapp 建立相应的目录 配置Maven和SpringMVC 配置Maven的pom.x ...
- Ubuntu14.0.4 64位 ADT 连接手机调试问题
1:使用 lsusb 命令查看USB 设备 y@y:~$ lsusbBus 001 Device 002: ID 8087:8000 Intel Corp. Bus 001 Device 001: I ...
- WPF笔记(1.6 数据绑定)——Hello,WPF!
原文:WPF笔记(1.6 数据绑定)--Hello,WPF! 这个一节都是在讲一个数据绑定的示例.功用:输入姓和名,点击Add按钮,ListBox增加一条记录,永远是字符串“name: nick”:L ...
- 序列化与反序列化 - BinaryFormatter二进制(.dat)、SoapFormatter(.soap)、XmlSerializer(.xml)
序列化的作用是什么?为什么要序列化? 1.在进程下次启动时读取上次保存的对象的信息. 2.在不同的应用程序域或进程之间传递数据. 3.在分布式应用程序中的各应用程序之间传输对象. 所为序列化,就是将对 ...
- Combinations 解答
Question Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. F ...
- POJ1679(次小生成树)
The Unique MST Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24201 Accepted: 8596 D ...
- JAVA I/O流 之入门
I/O流分类: 根据处理的数据类型不同 字节流 字符流 根据流向不同 输入流 输出流 根据功能不同 节点流:直接与数据源相连,读入或读出. 处理流:直接使用节点流,读写不方便,为了更快的读写文件,才有 ...