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
11729
UVa
11729
Commando War 贪心
GCommandoWarInput:StandardInputOutput:StandardOutput “Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawaythroug
q745401990
·
2014-02-23 10:00
C++
算法
uva
UVa
11729
Commando War 突击战
CommandoWarInput: StandardInputOutput: StandardOutput Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawaythrou
u012659423
·
2014-01-15 16:00
(UVA step1.2)UVA
11729
Commando War(单独交代+并行执行的最短时间求法)
/* *uva_
11729
.cpp * *Createdon:2013年11月17日 *Author:Administrator */ #include #include #include #include
caihongshijie6
·
2013-12-13 12:00
【索引】General Problem Solving Techniques:Examples
TrainingGuide(RujiaLiu)Chapter1.AlgorithmDesign::GeneralProblemSolvingTechniques:Examples11292-DragonofLoowater
11729
u011328934
·
2013-12-08 22:00
UVA
11729
- Commando War(贪心)
GCommandoWarInput: StandardInputOutput: StandardOutput “Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawaythro
u011217342
·
2013-12-06 21:00
uva
11729
- Commando War(贪心)
题目链接:uva
11729
-CommandoWar题目大意:有n个人要去执行任务,第i个人交代任务的时间为Bi,了解完任务之后会不间断的执行Ji分钟,完成所有任务的最短时间。
u011328934
·
2013-11-29 22:00
UVA -
11729
Commando War
题意:有N个部下,第i个部下你要花Bi分钟交代任务,然后他立即独立不间断的执行Ji分钟,你需要交代任务的顺序,使得所有的任务尽早的完成,注意,不能同时给两个部下交代任务,但部下可以同时执行他们各自的任务,求所有任务完成的最短时间,思路:贪心:按照J从大到小的顺序给各个任务排序,然后依次交代#include #include #include #include #include usingnames
u011345136
·
2013-11-24 16:00
Uva
11729
Commando War
G CommandoWarInput: StandardInputOutput: StandardOutput “Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawayt
u012797220
·
2013-11-13 22:00
Algorithm
ACM
uva
利用运算符重载将结构体排序--uva
11729
在国内上uva很慢,还好bnuoj有uva的题,很有爱(⊙o⊙)哦,代码参考自刘汝佳的训练指南题目链接:点击打开链接#include #include #include usingnamespacestd; #defineN1002 structJob{ intj,b; booloperatorx.j; } }; intmain() { intx,y,n; vectorv; intcases=0
Qxietingwen
·
2013-11-06 19:00
UVA
11729
突击战(贪心)
思路:要时间最短,即要求尽量多的任务同时进行,则把执行时间由大到小排序即可。#include #include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; structabc { intb,j; }a[1005]; boolc
u011466175
·
2013-10-18 22:00
UVa
11729
Commando War (贪心)
11729
-CommandoWarTimelimit:1.000secondshttp://uva.onlinejudge.org/index.php?
synapse7
·
2013-09-01 11:00
C++
ACM
uva
UVA
11729
Commando War
根据任务时间从大到小排序,保存当前士兵以后能够和其他人共同进行的时间。求出差的最大值,加上交代每个士兵任务这个必须时间就是答案。#include #include #include #include usingnamespacestd; structnode{intx,y;}man[1005]; intlast[1005]; boolcmp(constnode&a,constnode&b) { r
t1019256391
·
2013-08-29 10:00
UVA
11729
- Commando War
挺简单的贪心。直觉告诉我直接从时间长的任务开始交代就好了。可是总觉得怪怪的。直接敲了代码上去就AC了。然后看了看书发现思路没错:)#include usingnamespacestd; constintMAXN=1000+10; intB[MAXN],J[MAXN]; intmain() { intn,i,sum,count=1; while(cin>>n,n) { for(i=0;i>B[i]>
murmured
·
2013-07-22 11:00
UVA
11729
- Commando War(贪心 相邻交换法)
CommandoWarThereisawaranditdoesn'tlookverypromisingforyourcountry.Nowit'stimetoact.Youhaveacommandosquadatyourdisposalandplanninganambushonanimportantenemycamplocatednearby.Youhave N soldiersinyoursqu
·
2013-07-16 18:00
command
UVA
11729
Commando War
CommandoWarInput:StandardInputOutput:StandardOutput “Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawaythrough
lsh670660992
·
2013-07-15 21:00
UVA
11729
- Commando War
题目地址: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2829这也是一道贪心的题目。将Ji从大到小排序,然后找出最大的还需要多少时间。代码如下:(有详细注释)#include #include #include #include #include #i
ilovexiaohao
·
2013-05-18 11:00
UVa
11729
不知道今天咋地了,UVa需要翻出去看。http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2829学了一招:把""符号可以降序排列。证明就很水了,有点类似活动选择问题的思想。#include #include #include usingnamespacest
zhengnanlee
·
2013-05-09 21:00
uva
ACM题解报告
uva
11729
- Commando War(water)
GCommandoWarInput: StandardInputOutput: StandardOutput “Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawaythro
nealgavin
·
2013-05-09 20:00
UVA 题目
11729
- Commando War
Thereisawaranditdoesn'tlookverypromisingforyourcountry.Nowit'stimetoact.Youhaveacommandosquadatyourdisposalandplanninganambushonanimportantenemycamplocatednearby.Youhave N soldiersinyoursquad.Inyourma
SJF0115
·
2013-04-20 08:00
算法
uva
UVA
11729
Commando War 贪心的思想
题目链接briefintroduction:Eachsoilderneedstocompleteowntaskseperately,inotherwordshistaskdid'tdependonothersoilder'shelp.you,asacommander,needtoassignthetasktoeachother,youhavealreadyknowhowmuchtimeitcost
yangshuolll
·
2013-04-10 23:00
算法
UVA
11729
Commando War
大意略。思路:要时间最短,即要求尽量多的任务并发进行,则把执行时间由大到小排序即可。#include #include #include #include #include #include #include #include #include #include #include usingnamespacestd; constintmaxn=1010; structnode { intB,J
Wall_F
·
2013-04-10 17:00
UVA
11729
(Commando War-按执行时间贪心)
GCommandoWarInput: StandardInputOutput: StandardOutput “Waitingforordersweheldinthewood,wordfromthefrontnevercameByeveningthesoundofthegunfirewasmilesawayAhsoftlywemovedthroughtheshadows,slipawaythro
nike0good
·
2013-03-16 20:00
《算法竞赛入门经典——训练指南》第一章相关内容
问题求解策略(GeneralProblemSolvingTechniques)例题(Examples) 例题1UVa11292TheDragonofLoowater排序后用贪心法 例题2UVa
11729
CommandoWar
w00w12l
·
2013-03-10 21:00
uva
11729
- Commando War
点击打开链接uva
11729
思路:贪心 分析: 1 给定n个人的交待任务的时间和完成任务的时间,要求不能同时给两个人交代任务,但是可以多人同时去做任务,求最短的完成任务的时间 2 根据贪心的原则
从此醉
·
2013-02-28 19:00
command
uva
11729
- Commando War
点击打开链接uva
11729
思路:贪心分析:1给定n个人的交待任务的时间和完成任务的时间,要求不能同时给两个人交代任务,但是可以多人同时去做任务,求最短的完成任务的时间2根据贪心的原则,我们知道执行时间比较长的任务必须先交待
cgl1079743846
·
2013-02-28 19:00
uva
11729
题意:有n个人需要你分配任务,交代任务需要bi时间,执行任务需要ji时间,要求最早完成任务,请输出最后完成对的工作的时间。类型:贪心(先排序再处理)代码:#include #include #include #include usingnamespacestd; intmax(inta,intb){ returna>b?a:b; } structjob{ intj,b; boo
·
2013-02-08 20:00
uva
uva -
11729
- Commando War
题意:指挥官给N个军人分配任务,需用B[i]的时间给第i个人陈述任务,而此人需用J[i]的时间去完成此任务。问最短执行完所有任务的总时间。题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=117&problem=2829——>>水题。#includ
SCNU_Jiechao
·
2013-01-14 12:00
UVa
11729
Commando War
option=com_onlinejudge&Itemid=8&page=show_problem&problem=2829/* 刘汝佳《训练指南》第一章例题2 UVa
11729
CommandoWar
shuangde800
·
2012-12-06 23:00
UVa
11729
Commando War
com_onlinejudge&Itemid=8&page=show_problem&problem=2829 /* 刘汝佳《训练指南》第一章 例题2 UVa
11729
king_tt
·
2012-12-06 23:00
command
UVa
11729
Commando War
原题链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2829贪心。因为交代任务的时间Bi是不能减少的,所以首先交代完成时间Ji最长的部下。过程中更新最短所需时间。ViewCode1#include 2#include 3#include 4#de
·
2012-11-01 13:00
command
对竹子的"如何得到方法调用方的源代码行号?"的一点补充
直接用竹子的那种方式,http://www.java2000.net/p
11729
没有得到我想要的结果,后来把那些栈的信息打印出来,发现用竹子的方式得到的行号是调用的高层,如果要用这个方法,应该还是要根据自己的要求来
laorer
·
2008-11-17 11:00
上一页
1
2
下一页
按字母分类:
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
其他