E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Elevator
Elevator
(20)
没什么难的,简单模拟题#include usingnamespacestd; intmain() { intnum; cin>>num; intcost=0; intcurFloor=0; while(num--) { intfloor; cin>>floor; inttmp=floor-curFloor; cost+=tmp>0?6*tmp:-4*tmp; cost+=5; curFloor=
gzxcyy
·
2013-10-14 22:00
pat
HD-1008
Elevator
试题分析
1.它花费6秒,移动电梯上一层楼,2.向下移动一层,花费4秒,。3.每到一站,电梯将保持5秒钟,,对于一个给定的请求列表,你要计算花费的总时间,名单上的履行请求。4.当楼层为n层到n层时不要忘记保持5秒。这是关键!!!!!!!!!!!!!!!!!!!!!!//****通过源代码************************************************************#
u010893129
·
2013-10-08 20:00
源代码
C语言
ACM
关于软件工程结对编程作业 PairProject :
Elevator
Scheduler(电梯调度算法的实现与测试)的总结
1)结对编程队友11061163张绍铭11061195杨军 其中,此项目的编程实现主要由前者完成。 2)关于结对编程结对编程的优点:最直接的一点:在结对编程中,由于有另一个人在你身边和你配合完成同样一件事情的, 所以相对来说你不好意思糊弄,不好意思开小差,更加自觉。结对编程的时候两个人互相审查对方编程时的小错误,相当于随时随地地审查代码,减少错误出现的几率。结对编程无疑会让你更加注意代码的风格和
·
2013-10-07 23:00
scheduler
Linux IO Scheduler--CFQ(下)
staticstructelevator_typeiosched_cfq={.ops={.
elevator
_merge_fn=cfq_merge,.
elevator
_merged_fn=cfq_merged_request
peter_cloud
·
2013-09-24 14:00
uvalive 2949 -
Elevator
Stopping Plan(贪心+二分)
题目连接:2949-ElevatorStoppingPlan题目大意:某个抠门的公司只有一个电梯,现在有n个人从1楼,他们有各自想要到达的楼层,然后电梯每上一楼需要4秒,每在一个楼层开门需要10秒,然后然爬楼梯的话需要20一楼。问,如何用最短的时间让所有人都到达各自想要到的楼层。解题思路:因为人可以爬楼梯,所以可以在某个楼层下楼之后走楼梯到达想要到的楼层,只要在最后一个人到达之前就可以。对于时间可
u011328934
·
2013-09-01 15:00
[ACM]
Elevator
ProblemDescriptionThehighestbuildinginourcityhasonlyoneelevator.ArequestlistismadeupwithNpositivenumbers.Thenumbersdenoteatwhichfloorstheelevatorwillstop,inspecifiedorder.Itcosts6secondstomovetheeleva
sr19930829
·
2013-09-01 12:00
初始化
ACM
BNU 25588
Elevator
Trouble【裸BFS】
链接:http://www.bnuoj.com/bnuoj/problem_show.php?pid=25588http://www.bnuoj.com/bnuoj/contest_show.php?cid=2321#problem/25865D.ElevatorTroubleTimeLimit: 2000msCaseTimeLimit: 1000msMemoryLimit: 65536KB64-
Cfreezhan
·
2013-08-28 00:00
bfs
UVALive 2949
Elevator
Stopping Plan(二分 + 贪心)
ZSoftCorp.isasoftwarecompanyinGaoKeHall.Andtheworkersinthehallareveryhard-working.Buttheelevatorinthathallalwaysdrivesthemcrazy.Why?BecausethereisonlyoneelevatorinGaoKeHall,whiletherearehundredsofcomp
u011217342
·
2013-08-25 00:00
poj2392 Space
Elevator
(多重背包)
http://poj.org/problem?id=2392题意:有一群牛要上太空。他们计划建一个太空梯-----用一些石头垒。他们有K种不同类型的石头,每一种石头的高度为h_i,数量为c_i,并且由于会受到太空辐射,每一种石头不能超过这种石头的最大建造高度a_i。帮助这群牛建造一个最高的太空梯。吐槽:做练习的时候,连需不需要对数据排序都没分析清楚。。。下次再也不把练习安排在上午了,一般我上午状态
yew1eb
·
2013-08-20 00:00
Elevator
(20)
1008.
Elevator
(20)时间限制 400ms内存限制 32000kB代码长度限制 16000B判题程序 Standard作者 CHEN,YueThehighestbuildinginourcityhasonlyoneelevator.ArequestlistismadeupwithNpositivenumbers.Thenumbersdenoteatwhichfloorsthee
·
2013-08-12 22:00
ACM
pat
浙江大学
POJ 2392 Space
Elevator
Space
Elevator
Time Limit: 1000MS Memory Limit: 65536K Total Submissions:&
·
2013-08-03 21:00
poj
Hdu--1008--
Elevator
ElevatorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):34085 AcceptedSubmission(s):18562ProblemDescriptionThehighestbuildinginourcityhasonlyoneelevato
u010841344
·
2013-08-02 13:00
POJ2392:Space
Elevator
(多重背包)
DescriptionThecowsaregoingtospace!Theyplantoachieveorbitbybuildingasortofspaceelevator:agianttowerofblocks.TheyhaveK(1 #include #include usingnamespacestd; structnode { inth,hmax,n; }a[500];
libin56842
·
2013-07-26 10:00
HDU
背包
HDU 1008
Elevator
ElevatorTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):33476 AcceptedSubmission(s):18236ProblemDescriptionThehighestbuildinginourcityhasonlyoneelevato
fjy4328286
·
2013-07-16 16:00
在linux系统中I/O 调度算法
在linux下面列出4种调度算法CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
=cfq):这是默认算法,对于通用服务器来说通常是最好的选择。
opple12
·
2013-07-16 13:39
linux
服务器
video
多媒体
通用
POJ 1744
Elevator
Stopping Plan
题意:N个人要到f1,f2...fn层楼,已知电梯每升一层要4秒,到某一层要停留10秒,人爬楼梯上一层要20秒。求出所有人都到达自己想去的楼层的最短时间。分析:二分+贪心。对时间二分,贪心的判断在这固定的时间内是否能让所有人到达自己想去的楼层。贪心的判断就是让电梯尽可能的往上跑,以给要到较高楼层的人节省中间停留时间,而让时间比较充裕的到较低层的人尽可能多走楼梯,从而让总体时间最小。Code:#in
HRHACMER
·
2013-07-11 15:00
Elevator
(20)-PAT
1008.
Elevator
(20)时间限制400ms内存限制32000kB代码长度限制16000B判题程序Standard作者CHEN,YueThehighestbuildinginourcityhasonlyoneelevator.ArequestlistismadeupwithNpositivenumbers.Thenumbersdenoteatwhichfloorstheelevatorwi
zoushidexing
·
2013-07-11 15:00
HDU-1008
Elevator
ProblemDescriptionThehighestbuildinginourcityhasonlyoneelevator.ArequestlistismadeupwithNpositivenumbers.Thenumbersdenoteatwhichfloorstheelevatorwillstop,inspecifiedorder.Itcosts6secondstomovetheeleva
ultimater
·
2013-06-28 10:00
浙大PAT (Advanced Level) Practise 1008
Elevator
(20)
/*本题是道水题,直接考察前后两个数字的关系解题,代码如下:*/#includeusingnamespacestd;intmain(){intn;while(cin>>n){intnum[10000]={0};intt=0;for(inti=1;i>num[i];if(num[i]>num[i-1])//上楼t=t+(num[i]-num[i-1])*6;elseif(num[i]
struggler_1990
·
2013-06-14 13:19
c++学习
浙大PAT
c++练习
浙大PAT
poj 2392 Space
Elevator
(dp 排序+多重背包)
题目:点击打开链接题目大意:有n种砖头,每种砖头的高为h,数量为c,且它放的最高位置不能超过a。问这些砖最高能够叠多高?思路:先把所有种类砖头按照a从大到小排序,然后直接套多重背包即可。代码:#include #include #include #include #include #include #include #include #include #defineMPmake_pair #def
shuangde800
·
2013-05-31 21:00
poj 2392 Space
Elevator
(dp 排序+多重背包)
题目:点击打开链接 题目大意: 有n种砖头,每种砖头的高为h,数量为c, 且它放的最高位置不能超过a。 问这些砖最高能够叠多高? 思路: 先把所有种类砖头按照a从大到小排序,然后直接套多重背包即可。 代码: #include<iostream> #include<queue> #include<stack> #include<c
king_tt
·
2013-05-31 21:00
poj
Elevator
(20)
题目地址:http://pat.zju.edu.cn/contests/pat-a-practise/1008水题,不多说,代码如下:#include #include #include #include #include #include usingnamespacestd; intmain() { //freopen("D://test.txt","r",stdin); intn,total
eli850934234
·
2013-05-05 15:00
编程
ACM
pat
浙大
hdu 1008
Elevator
一开始想的时候吧那个搞错了,那个在同一层的时候对停留5S1#include 2#include 3 4inta[3005]; 5 6intmain() 7{ 8intn; 9while(scanf("%d",&n)&&n) 10{ 11inti; 12longsum=0; 13memset(a,0,sizeof(a)); 14for(i=1;ia[i-1]) 19sum
·
2013-04-22 10:00
HDU
zju-pat 1008.
Elevator
#include #include usingnamespacestd; intn; inta[105]; voidrun() { inti; for(i=0;icur) { ans=ans+(a[i]-cur)*6; ans+=5; cur=a[i]; } elseif(a[i]
Matrix_Reloaded
·
2013-03-27 22:00
在linux系统中I/O调度的选择
在linux下面列出4种调度算法CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
=cfq):这是默认算法,对于通用服务器来说通常是最好的选择。
Junfei-Yang
·
2013-03-18 14:54
linux
在linux系统中I/O调度的选择
在linux下面列出4种调度算法CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
=cfq):这是默认算法,对于通用服务器来说通常是最好的选择。
Devliyangjunfei
·
2013-03-18 14:00
系统调优
在linux系统中I/O调度的选择
在linux下面列出4种调度算法CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
=cfq):这是默认算法,对于通用服务器来说通常是最好的选择。
Devliyangjunfei
·
2013-03-18 14:00
系统调优
Elevator
(20)
考察以时间cost为核心的电梯时间模拟#include intmain() { intn; while(scanf("%d",&n)!=EOF) { intfloorNow=0; intsum=0; while(n--) { intrequest; scanf("%d",&request); if(request>floorNow) sum+=(request-floorNow)*6; else
sunbaigui
·
2013-03-11 09:00
pat
ZJU
1010 C语言--
Elevator
#include"stdio.h" #include"stdlib.h" intmain(){ intn=1,i,sum; int*a; while(scanf("%d",&n)!=EOF&&n!=0){ a=(int*)malloc((n+1)*sizeof(int)); a[0]=0; sum=0; for(i=1;i0){ sum=sum+temp*6; }
J2EE大鸟
·
2013-03-02 12:00
C语言
1010 C语言--
Elevator
#include"stdio.h" #include"stdlib.h" intmain(){ intn=1,i,sum; int*a; while(scanf("%d",&n)!=EOF&&n!=0){ a=(int*)malloc((n+1)*sizeof(int)); a[0]=0; sum=0; for(i=1;i0){ sum=sum+temp*6; }
J2EE大鸟
·
2013-03-02 12:00
C语言
Linux IO Scheduler--CFQ(下)
CFQ调度器的定义如下:staticstructelevator_typeiosched_cfq={ .ops={ .
elevator
_merge_fn=cfq_merge, .
elevator
_merged_fn
vanbreaker
·
2012-12-17 20:00
hud1008 电梯 迭代模拟计算
Elevator
http://acm.hdu.edu.cn/showproblem.php?
richard_ma
·
2012-12-04 18:00
HDU
水题
PAT1008
Elevator
电梯上升一层6秒,下降一层4秒,每层停留5秒Sample Input: 3 2 3 1 Sample Output: 41 #include <iostream> using namespace std; int main() { in
风吹过PP好冷
·
2012-11-19 23:00
pat
Hdu 1008 -
Elevator
直接上AC代码:#include intmain() { intn,a[105],i,time; while(scanf("%d",&n)!=EOF) { time=0; if(!n)break; for(i=0;ia[i-1]) time+=(6*(a[i]-a[i-1])+5); if(a[i]
Chuck_0430
·
2012-11-06 20:00
在linux系统中I/O 调度的选择
转载:http://www.php-oa.com/2010/01/03/linux-io-
elevator
.htmlI/O调度算法再各个进程竞争磁盘I/O的时候担当了裁判的角色.他要求请求的次序和时机做最优化的处理
zhangxinrun
·
2012-10-24 10:00
Linux磁盘I/O调度算法杂谈
在linux下面列出4种调度算法:CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
=cfq):这是默认算法,对于通用服务器来说通常是最好的选择。
torvalds0310
·
2012-10-04 12:13
deadline
NOOP
FCQ
Anticipatory
Linux磁盘I/O调度算法杂谈
在linux下面列出4种调度算法:CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
=cfq):这是默认算法,对于通用服务器来说通常是最好的选择。
·
2012-10-04 12:13
deadline
NOOP
FCQ
Anticipatory
英语名言
There is no
elevator
to success—only stairs. 3.成功的秘密在于始终如一地忠于目标。
焦志广
·
2012-09-19 22:00
英语
uva 12486-Space
Elevator
//http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3930//Problemdescription:SpaceElevatorChinaisbuildingaspaceelevator,whichwillallowthelaunchingprobesand
laziercs
·
2012-09-19 22:00
c
Integer
input
each
output
POJ 3930
Elevator
模拟
题意:给n条指令,模拟电梯的运行过程。Sure原创,转载请注明出处。#include #include #include #include usingnamespacestd; constintmaxn=102; structinstuction { intt,up; intfr,to; booloperatorother.up; } returnt>1][2][maxn],num[maxn>>1
Flying_Stones_Sure
·
2012-09-15 18:00
在linux系统中 I/O 调度的选择
他要求请求的次序和时机做最优化的处理,以求得尽可能最好的整体I/O性能.其实所有的IO 优化只有二点,合并和排序…在linux下面列出4种调度算法CFQ(CompletelyFairQueuing完全公平的排队)(
elevator
wj_j2ee
·
2012-09-14 10:00
linux
算法
优化
command
磁盘
linux内核
POJ 2392 Space
Elevator
(多重背包)
题目链接:(—_—)zZ题目大意:Thecowsaregoingtospace(吐槽:牛要上太空?这真的牛逼),现在奶牛要搭建一个上太空的电梯,用的是高科技材料板砖,每个板砖有一定的高度,和它最高能堆积在a_i高度处,现在给出k个板砖的信息(每个砖的高度,所能在的最大高度,和个数),求能堆积出的电梯最大高度.思路:多重背包问题,把板砖的所在最大高度看成容量,从小到大的动态转移.题目大意:#incl
ulquiorra0cifer
·
2012-07-31 20:00
POJ 2392 Space
Elevator
0-1背包
来源:http://poj.org/problem?id=2392题意:有一些种类的砖块,其中每种砖块的高度和数量给了,而且每种砖块都有一个限制条件,就是说以该种砖块结束的最大高度H不能超过某个高度,不同砖块的该高度不同。求最高的高度是多少。思路:由于每种砖块的高度H限制了取得砖块数,而且也决定了砖块放的顺序。因此,先对砖块的种类按照H的高度从小到达排序,之后对每种砖块按照0-1背包处理就行了代码
wmn_wmn
·
2012-07-12 17:00
struct
POJ 2392 Space
Elevator
转载请注明出处,谢谢http://blog.csdn.net/ACM_cxlove?viewmode=contents by---cxlove多重背包,但是每一个物品有容量限制。N个柱子,每个柱子有高度,但是有海拔限制。所有柱子的容量限制可以求出,就是所有限制的最大值。对于每一个物品改变上界,直接多重背包,然后果断样例都出不了。只有先计算限制小的,然后再算限制大的,这样才能保证在
ACM_cxlove
·
2012-07-06 21:00
Linux I/O scheduler
from: http://www.redhat.com/magazine/008jun05/features/schedulers/4种调度方法:CompletelyFairQueuing—
elevator
nomad2
·
2012-06-17 15:00
Poj 2392 Space
Elevator
(DP_背包)
题目链接:http://poj.org/problem?id=2392题目大意:给定n种积木,每种积木都有一个高度hi,一个数量numi,还有一个限制条件,这个积木所在的位置不能高于maxhi,问能叠起的最大高度。解题思路:一看到题目觉得水题,之前做的背包容量都是固定的,这题容量是根据每个物品的maxhi而定,枚举容量的时候改动下就可以。于是乎开始敲代码,几分钟就敲完运行下竟然样例都不出。后来发现
woshi250hua
·
2012-06-01 15:00
struct
测试
kvm 性能调节总结
1.The optimal configuration is (usually) as follows: On the host, set
elevator
=deadline 2.Use virtio
yingbin920
·
2012-05-31 15:00
kvm
poj2392 - Space
Elevator
想看更多的解题报告:http://blog.csdn.net/wangjian8006/article/details/7870410 转载请注明出处:http://blog.csdn.net/wangjian8006题目大意:有一头奶牛要上太空,他有很多种
wangjian8006
·
2012-05-27 23:00
c
struct
user
oracle的declare声明语法
declare ccinteger;begin pkg_
elevator
_ref.sp_
elevator
_ref_add(i_id=>351,
bullswu
·
2012-04-18 14:00
oracle
null
linux的CFQ调度器解析(3)
staticstructelevator_typeiosched_cfq={.ops={.
elevator
_merge_fn=cfq_merge,.
elevator
_merged_fn=cfq_merged_request
majieyue
·
2012-04-18 12:00
算法
linux
struct
Class
insert
merge
上一页
3
4
5
6
7
8
9
10
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他