Box of Bricks
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 63 Accepted Submission(s) : 20
#include <stdio.h>
#include <stdlib.h> int main()
{
int n,a[],i,sum,sign,j=;
scanf("%d",&n);
while()
{
for(i=,sum=;i<n;i++)
{
scanf("%d",&a[i]);
sum+=a[i];
}
sum/=n;
for(i=,sign=;i<n;i++)
{
if(a[i]>sum)
{
sign+=a[i]-sum;
}
}
printf("Set #%d\nThe minimum number of moves is %d.\n\n",j,sign);
j++;
scanf("%d",&n);
if(n==)
break;
}
return;
}
Box of Bricks的更多相关文章
-
HDOJ 1326. Box of Bricks 纯水题
Box of Bricks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) To ...
-
Box of Bricks最小移动砖块数目
Description Little Bob likes playing with his box of bricks. He puts the bricks one upon another and ...
-
[POJ1477]Box of Bricks
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19503 Accepted: 7871 Description Litt ...
-
HDOJ(HDU) 2088 Box of Bricks(平均值)
Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one upon ano ...
-
HDOJ 1326 Box of Bricks(简单题)
Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one upon ano ...
-
591 - Box of Bricks
Box of Bricks Little Bob likes playing with his box of bricks. He puts the bricks one upon another ...
-
HDU 2088 Box of Bricks
http://acm.hdu.edu.cn/showproblem.php?pid=2088 Problem Description Little Bob likes playing with his ...
-
HDU 2088 Box of Bricks(脑洞)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=2088 Box of Bricks Time Limit: 1000/1000 MS (Java/Oth ...
-
zoj 1251 Box of Bricks
Box of Bricks Time Limit: 2 Seconds Memory Limit: 65536 KB Little Bob likes playing with his bo ...
随机推荐
-
关于Java语言和面向对象记录
本科时常用的c语言是面向过程的语言,而Java是面向对象的语言 Java语言的11个关键术语 简单性.可移植性.面向对象.分布式.高性能.解释型.健壮性.多线程.安全性.动态性.体系结构中立 面向对象 ...
-
Hybrid框架UI重构之路:四、分而治之
上文回顾:Hybird框架UI重构之路:三.工欲善其事,必先利其器 上一篇文章有说到less.grunt这两个工具,是为了css.js分模块使用的.UI框架提供给使用者的时候,是一个大的xxx.js. ...
-
finder的隐藏文件&;IOS虚拟机地址
在终端里输入下面命令即可让它们显示出来. defaults write com.apple.finder AppleShowAllFiles -bool true 如果想恢复隐藏,可以用这个命令: ...
-
35、Android 性能优化、内存优化
http://blog.csdn.net/a_asinceo/article/details/8222104 http://blog.csdn.net/a_asinceo/article/detail ...
-
基于 SWTBot 进行 Eclipse GUI 自动化测试
背景简介 在软件开发领域,持续集成和部署对于软件测试自动化提出了越来越高的要求,基于 Eclipse 应用在这一需求中仍然占据重要的组成部分.目前主流的测试自动化工具主要以录制回放的功能为主,辅助以脚 ...
-
prologue epilogue
https://www.hackerschool.com/blog/7-understanding-c-by-learning-assemblyhttps://www.hackerschool.com ...
-
wp系统笔记
1.了解了justified-image-grid是wp插件,继而查看wp,wp是一个免费建站系统.内置主题和插件.博客,CMS,企业站等.php+mysql 环境至少5.0以上 2.在zh-word ...
-
精进之路之JMM
JMM (Java Memory Model) java内存模型 Java内存模型的抽象 Java线程之间的通信由Java内存模型(本文简称为JMM)控制,JMM决定一个线程对共享变量的写入何时对另一 ...
-
webpack+typescript
1. npm install --save typescript 2. npm install --save ts-loader webpack.config.js module.exports = ...
-
poj3614 Sunscreen【贪心】
Sunscreen Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11772 Accepted: 4143 Descri ...