码迷,mamicode.com
首页 >  
搜索关键字:poj1700    ( 12个结果
一个一定要好好提溜出来的贪心题
poj1700 Crossing River 题意描述: 有N个人要渡河,但是只有一艘船,船上每次最多只能载两个人,渡河的速度由两个人中较慢的那个决定,小船来回载人直到所有人都渡河,求最短的渡河时间。 输入: 输入有T组数据: 每组数据第一行为一个n,表示共有n个人; 第二行包含n个整数,为每个人的 ...
分类:其他好文   时间:2019-07-24 09:50:33    阅读次数:71
poj1700真正感受到贪心的力量
Crossing River A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle ...
分类:其他好文   时间:2017-10-29 21:55:41    阅读次数:235
poj1700 Crossing River
Crossing River Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12585 Accepted: 4787 Description A group of N people wishes to go across a r ...
分类:其他好文   时间:2017-08-15 10:03:55    阅读次数:120
POJ1700----Crossing River
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int a[1005]; 7 int min(int x, int y) 8 { 9 return x > t; 15 while (t--) 16 { 17 c... ...
分类:其他好文   时间:2017-08-01 00:49:37    阅读次数:218
阶段性总结-贪心算法
### 贪心算法总结 ##poj1328> 贪心算法使用点:> 雷达覆盖距离最大为d 的岛屿,也就是以岛屿为圆心,d为半径与海岸线的相交的区间为该雷达的可在范围> 尽可能少的雷达:每个岛屿都有一个上述的圆和一个雷达可在的区间范围,区间范围重叠的岛屿可共用一个雷达 ##poj1700>贪心算法使用点: ...
分类:编程语言   时间:2016-11-30 02:14:39    阅读次数:138
POJ1700 Crossing River(贪心算法训练)
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13301 Accepted: 5087 Description A group of N people wishes to go across a river with only ...
分类:编程语言   时间:2016-07-14 02:03:58    阅读次数:657
poj 3404&&poj1700(贪心)
Bridge over a rough river Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4143 Accepted: 1703 Description A group of N travelers (1 ≤ N ≤ 5 ...
分类:其他好文   时间:2016-04-14 17:51:43    阅读次数:262
poj1700--贪心算法
题意:一群人坐船过河,船只有一辆,且一次最多坐两人,时间按慢的算。求最短过河时间? 总共有两种做法可使用: 1.先让最快和次快的过去,让最快的把船开回,再让最慢和次慢的过去,让次快的把船开回。需两个来回可将最慢和次慢过河。 2.让最快带着最慢过河,最快将船开回,再让最快带着次慢过河,最快将船开...
分类:编程语言   时间:2015-10-15 15:57:16    阅读次数:167
POJ1700(过河问题)
#include#includeusing namespace std;int n,a[1006];int main(){ int t,i; cin>>t; while(t--) { int f=0; //每次f归0 cin>>n; ...
分类:其他好文   时间:2015-07-26 20:41:12    阅读次数:139
POJ1700:Crossing River(过河问题)
POJ1700Time Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uDescriptionA group of N people wishes to go across a river with on...
分类:其他好文   时间:2015-07-19 20:03:32    阅读次数:146
12条   1 2 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!