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
cow
POJ3045--
Cow
Acrobats
题目大意:有N头牛要玩叠罗汉....每头牛有两个属性,重量值weight和强壮值strength。每头牛的倒塌风险为它上方所有牛的重量和-它自己的强壮值。求如何叠,使得所有牛中风险最大的要最小。 分析:贪心。w+s越大,就放在越下面。假设现在是最优放置,最下面一头牛记作第一头牛(w1,s1),它上面的一头牛记作第二头牛(w2,s2),且w1+s1>=w2+s2。第二头牛上方的重量之和为sum。那么
hhhhhhj123
·
2015-08-22 19:00
POJ 3268 Silver
Cow
Party(最短路 dijkstra求任意两点最短路)
题意:奶牛派对:有分别来自N个农场的N头牛去农场X嗨皮,农场间由M条有向路径连接。每头牛来回都挑最短的路走,求它们走的路的最大长度?奶牛派对:有分别来自N个农场的N头牛去农场X嗨皮,农场间由M条有向路径连接。每头牛来回都挑最短的路走,求它们走的路的最大长度?开始思路,就是求某个点到x加上x到这某个点距离最大,直接floyed,1000数据果然TLE,dijkstra只能求一点到多点的最短路,这里开
yexiaohhjk
·
2015-08-22 12:00
dijkstra
POJ 3268 Silver
Cow
Party
DescriptionOnecowfromeachof N farms(1≤ N ≤1000)convenientlynumbered1..N isgoingtoattendthebigcowpartytobeheldatfarm#X (1≤ X ≤ N).Atotalof M (1≤ M ≤100,000)unidirectional(one-wayroadsconnectspairsoffar
zhou_yujia
·
2015-08-21 16:00
算法
poj
最短路
HDU2602
inTeddy’shometowntherewasamanwhowascalled“BoneCollector”.Thismanliketocollectvariesofbones,suchasdog’s,
cow
mrlry
·
2015-08-19 11:00
dp
背包问题
Cow
Bowling
CowBowlingTimeLimit:1000MSMemoryLimit:65536KTotalSubmissions:15585Accepted:10363DescriptionThecowsdon’tuseactualbowlingballswhentheygobowling.Theyeachtakeanumber(intherange0..99),though,andlineupinast
huayunhualuo
·
2015-08-17 21:00
HDOJ 2717 Catch That
Cow
【BFS】
CatchThatCowTimeLimit:5000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):9665 AcceptedSubmission(s):3022ProblemDescriptionFarmerJohnhasbeeninformedofthelocationofaf
qq_24678203
·
2015-08-17 18:00
POJ 1985--
Cow
Marathon【树的直径 && 模板】
CowMarathonTimeLimit: 2000MS MemoryLimit: 30000KTotalSubmissions: 4182 Accepted: 2116CaseTimeLimit: 1000MSDescriptionAfterhearingabouttheepidemicofobesityintheUSA,FarmerJohnwantshiscowstogetmoreexerci
hpuhjh
·
2015-08-17 17:00
The
Cow
Lexicon
TheCowLexiconTimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:8815Accepted:4162DescriptionFewknowthatthecowshavetheirowndictionarywithW(1≤W≤600)words,eachcontainingnomore25ofthecharacters‘a’..’z’.Th
huayunhualuo
·
2015-08-17 17:00
HDU 2602 Bone Collector
inTeddy’shometowntherewasamanwhowascalled“BoneCollector”.Thismanliketocollectvariesofbones,suchasdog’s,
cow
qq_21120027
·
2015-08-16 16:00
动态规划
HDU
POJ3045
Cow
Acrobats(贪心)
传送门大意:有N头牛叠罗汉,对于每头牛定义一个难受值D,D等于在它上面的所有奶牛的体重减去它的力量。拿到这道题,感觉无从下手啊,贪力量,可是体重就不能保证上面的最好了。正解其实是要贪每头牛的力量加上体重,和大的放在下面。证明:设Di表示第i头奶牛的难受值,Wi表示第i头奶牛的体重,Si表示第i头奶牛的力量,令i,j相邻,且Wi+Si>Wj+Sj,设∑表示i和j上面的奶牛的重量之和当i在j的上方时有
geng4512
·
2015-08-15 18:00
poj
【系统编程】进程控制
①fork:创建一个子进程,父子进程共享一份代码程序,但是各有一份独立的数据,为了效率和保持数据的独立采用写时复制技术(
COW
)。运行无优先级。
better_luve
·
2015-08-15 17:00
POJ 3268 Silver
Cow
Party(最短路dijkstra)
SilverCowPartyTimeLimit:2000MS MemoryLimit:65536KTotalSubmissions
hellohelloC
·
2015-08-15 08:00
hdu2602-Bone Collector (背包)
inTeddy’shometowntherewasamanwhowascalled“BoneCollector”.Thismanliketocollectvariesofbones,suchasdog’s,
cow
lljjccsskk
·
2015-08-13 21:00
POJ 3268 Silver
Cow
Party
链接:http://poj.org/problem?id=3268SilverCowPartyTimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:15081Accepted:6808DescriptionOnecowfromeachofNfarms(1≤N≤1000)convenientlynumbered1..Nisgoingtoattendth
Silenceneo
·
2015-08-13 21:00
poj
dijkstra算法
POJ 3617 Best
Cow
Line
题目链接:http://poj.org/problem?id=3617解题思路:按照字典序比较S和将S反转后的字符串S‘如果S较小,就从S的开头取出一个文字,追加到T的末尾如果S’较小,就从S的末尾取出一个文字,追加到T的末尾注意,题目有坑: Everyline(exceptperhapsthelastone)containstheinitialsof80cows('A'..'Z')inthene
piaocoder
·
2015-08-11 19:00
贪心
hdu 2717 Catch That
Cow
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2717解题思路:简单的搜索题,直接搜就可以了。。。AC代码:#include #include #include #include usingnamespacestd; constintN=100000; intn,k; intvis[N+10]; voidbfs(){ queueq; while(
piaocoder
·
2015-08-10 15:00
搜索
HDU - 2838
Cow
Sorting (树状数组 + 逆序对)
HDU-2838CowSortingTimeLimit: 1000MS MemoryLimit: 32768KB 64bitIOFormat: %I64d&%I64uSubmit StatusDescriptionSherlock'sN(1≤N≤100,000)cowsarelineduptobemilkedintheevening.Eachcowhasaunique"grumpiness"lev
qq_18661257
·
2015-08-10 13:00
[贪心]poj3045
Cow
Acrobats
写出式子,风险值就应该等于W总-Wnow-Snow,那么就应该为W总-(Wnow+Snow),然后可以看出要值最小,那么Wnow+Snow应该最大,所以按这个进行排序,然后最大的放最下面即可#include #include #include #include #include #include usingnamespacestd; constintINF=0x3f3f3f3f; structno
u012848631
·
2015-08-08 10:00
HDU 2717:Catch That
Cow
【bfs】
题目链接CatchThatCowTimeLimit:4000/2000ms(Java/Other) MemoryLimit:131072/65536K(Java/Other)TotalSubmission(s):68 AcceptedSubmission(s):28ProblemDescriptionFarmerJohnhasbeeninformedofthelocationofafugi
lin14543
·
2015-08-06 14:00
HDU
bfs
POJ 3278 Catch That
Cow
(bfs)
CatchThatCowTimeLimit:2000MS MemoryLimit:65536KTotalSubmissions:61246 Accepted:19124DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤1
zwj1452267376
·
2015-08-06 12:00
Catch That
Cow
TimeLimit:5000/2000MS(Java/Others) Memory Limit:32768/32768K(Java/Others)TotalSubmission(s):9254 AcceptedSubmission(s):2906ProblemDescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowand
l15738519366
·
2015-08-05 21:00
POJ - 3660 -
Cow
Contest (floyd求传递闭包)
CowContest题目传送:CowContest思路:floyd求传递闭包,即用来判断每一个点是否可以到达另一个点,然后根据该点的可以到达的点的个数和可以被到达的次数之和等于n-1,来判断该点是否已经确定了排名AC代码:#include #include #include #include #include #include #include #include #include #include
u014355480
·
2015-08-04 22:00
闭包
ACM
poj
POJ2184--
Cow
Exhibition
有篇文章写的比较清楚http://www.hankcs.com/program/algorithm/poj-
cow
-exhibition-problem-solution-challenge-programming-contest
hhhhhhj123
·
2015-08-04 10:00
暑假集训第四周 阶段一 DP 动态规划 B - Bone Collector
inTeddy’shometowntherewasamanwhowascalled“BoneCollector”.Thismanliketocollectvariesofbones,suchasdog’s,
cow
linyuxilu
·
2015-08-03 19:00
dp
POJ 3268 Silver
Cow
Party (存逆图+两次dijkstra求解)
题意:求哪个点到终点的最短路加上终点回来的最短路最大所以存两个图,一个是正向的,从终点出发,求回来时的最短路一个是逆向的,还是从终点出发,不过求的是从每个点去时的最短路,因为是逆向的图,所以可以把终点当作起点来处理如果不用逆图的话,要从每个点出发计算一次,这样显然是会超时的,建逆图的优势就体现在这里然而实际上并不需要两个图来计算,只要一个图,在计算的时候把边的指向反过来写就是逆向计算了用一个d[]
xtttgo
·
2015-08-02 21:00
Catch That
Cow
寻找那头牛
J- CatchThatCowTimeLimit:2000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uSubmit StatusDescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsa
jingttkx
·
2015-07-28 21:00
poj 3278 Catch That
Cow
CatchThatCowTimeLimit:2000MS MemoryLimit:65536KTotalSubmissions:60418 Accepted:18842DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwant
Code_KK
·
2015-07-28 09:00
暑假集训第三周 STL J - Catch That
Cow
抓捕奶牛
J- CatchThatCowTimeLimit:2000MS MemoryLimit:65536KB 64bitIOFormat:%I64d&%I64uSubmit StatusDescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsa
linyuxilu
·
2015-07-27 21:00
队列
STL
深搜
POJ
Cow
Sorting 3270【哈希表+置换群】
CowSortingTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 6402 Accepted: 2482DescriptionFarmerJohn's N (1≤ N ≤10,000)cowsarelineduptobemilkedintheevening.Eachcowhasaunique"grumpiness"levelinthe
ydd97
·
2015-07-27 20:00
poj 2184
Cow
Exhibition 负值01背包
#include #include #include usingnamespacestd; constintinf=10) { for(j=200000;j>=s[i];j--) if(dp[j-s[i]]>-inf) dp[j]=max(dp[j-s[i]]+f[i],dp[j]); } else { for(j=s[i];j-inf) dp[j]=max(dp[j-s[i]]+f[i],dp
xinag578
·
2015-07-27 15:00
BFS-POJ-3278-Catch That
Cow
CatchThatCowTimeLimit:2000MSMemoryLimit:65536KB64bitIOFormat:%I64d&%I64uDescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100,000)onanu
Roy_Yuan
·
2015-07-26 19:00
c
bfs
POJ 2184
Cow
Exhibition
Description"Fatanddocile,biganddumb,theylooksostupid,theyaren'tmuch fun..." -CowswithGunsbyDanaLyons Thecowswanttoprovetothepublicthattheyarebothsmartandfun.Inordertodothis,Bessiehasorganizedanexhibit
jtjy568805874
·
2015-07-26 16:00
poj
四步练就地道英语发音
但是很多童鞋往往会把双元音发成单元音,比如,把/ai/time读成[tem],/ei/make读成[mek],/au/
cow
读成[kɔ],这样说出的英语时不准确不地道的。
oywl2008
·
2015-07-26 13:00
英语
Catch That
Cow
广度优先搜索
CatchThatCowTimeLimit:2000msMemorylimit:65536K有疑问?点这里^_^题目描述FarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100,000)onanumberlineandthecowisatap
HAI__嗨I起来
·
2015-07-25 21:44
搜索
Catch That
Cow
广度优先搜索
CatchThatCowTimeLimit:2000ms Memorylimit:65536K 有疑问?点这里^_^题目描述FarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100,000)onanumberlineandthecowis
became_a_wolf
·
2015-07-25 21:00
poj3270--
Cow
Sorting(置换群)
题目链接:点击打开链接题目大意:给出你n个数,要求把这n个数排列成有序的(由小到大),每次可以交换两个数,花费是这两个数的和,现在求最小的花费置换群的入门求出每一个轮换的圈,对于每一个轮换中,只有在自身内交换就能完成有序,而不需要和其它轮换交叉。一个轮换的最小值temp,轮换中有num个数,轮换的总和是sum,整个序列的最小值min1让一个轮换花费最少有两种可能1、轮换自身交换,轮换的最小值和其他
u013015642
·
2015-07-24 21:00
HDOJ 2717 Catch That
Cow
(BFS)
CatchThatCowTimeLimit:5000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):8896 AcceptedSubmission(s):2806ProblemDescriptionFarmerJohnhasbeeninformedofthelocationofaf
helloiamclh
·
2015-07-24 10:00
Btrfs文件系统在Linux中的创建及其特性
Btrfs(B-treefilesystem,B-tree文件系统)是针对Linux开发的一个新的
CoW
(copy-on-write,写时复制)文件系统。
最新更新消息
·
2015-07-24 07:00
POJ-3278-Catch That
Cow
-广搜(BFS)
题目链接:http://poj.org/problem?id=3278这是一道广搜的模板题,我就不解释了,直接看代码;#include #include #include #include #include #include #include #include #include #include #defineLLlonglong #defineMAXN100000 usingnamespaces
wlxsq
·
2015-07-22 09:00
bfs
POJ3278
广搜模板
POJ 3660
Cow
Contest (Floyd)
http://poj.org/problem?id=3660 题目大意:n头牛两两比赛经过m场比赛后能判断名次的有几头可转 化为路径问题,用Floyd将能够到达的路径标记为1,如果一个点能 够到达剩余你n - 1个点则能判断该点的名次 #include<stdio.h> #include<stdlib.h> #include<math.h> #i
·
2015-07-22 08:00
floyd
H -
Cow
Contest
有N头牛,编号从1到N,参与一个变成比赛(大牛编程比赛,一般水水平敢参加???),一些牛的代码比较出色,每头牛都有一个独一无二的技能等级在这些竞争者中。 比赛循环进行在任意两头牛之间(姑且这么翻译吧),如果牛A的等级比牛B(牛逼。。。。这才是最厉害的选手吧),,那么牛A永远能击败牛B。 约翰试图排列牛的必杀技等级(约翰才是最牛叉的,养了一群牛精),给你M条比赛结果,来判断这些牛的等级,保证
·
2015-07-17 17:00
test
POJ 3268 Silver
Cow
Party
2015年7月17日。POJ3268SilverCowParty题目大意:有N(1FileName:3268.cpp>Author:Royecode>Email:Royecode@163.com************************************************************************/ #include #include #include #
Royecode
·
2015-07-17 15:00
最短路
dijkstra
Silver-Cow
POJ3268
D - Silver
Cow
Party
题目大意: 在一个农场里面所有的牛都会来参加大牛举办的派对,不过农场的路都是单向的,而且每头牛都喜欢都最短的路程,那么问题来了,求出来来回花费时间最多的那头牛所用的时间。。。 ///////////////////////////////////////////////////////// 从派对的地点求一遍spfa可以得到回去路的最短距离,如果添加反边就是去的路的最短距离,淡然注意分
·
2015-07-17 10:00
part
C - Catch That
Cow
题目大意 农民约翰需要抓住他的牛,他和他的牛在一条直线上(估计是一维生物),约翰在N N (0 ≤ N ≤ 100,000) 处,他的牛在 K (0 ≤ K ≤ 100,000) ,约翰下次可以移动到x+1或者x-1或者2*x的地方,问约翰最少需要多少步才能找到他的牛。 也是非常非
·
2015-07-15 13:00
catch
编译器实践 二 之 小型的词法分析器
usingnamespacestd; intmain() { charstr[150]; //freopen("C:\\Users\\Lionel\\Desktop\\1.txt","r",stdin); introw=1,
cow
Lionel_D
·
2015-07-13 20:00
编译器
词法分析器
UVA 10491
Cow
and Cars
代码:#include #include usingnamespacestd; intmain() { intcow,car,show; while(cin>>
cow
>>car>>show) { doublep
David_Jett
·
2015-07-13 13:00
入门
uva
POJ 3278 && HDU 2717 Catch That
Cow
(bfs)
Description给定两个整数n和k,通过n+1或n-1或n*2这3种操作,使得n=k,输出最少的操作次数(0≤n≤100,000)Input两个整数n和kOutput输出最少操作次数SampleInput517SampleOutput4Solution简单bfsCode#include #include #include #include usingnamespacestd; queuequ
V5ZSQ
·
2015-07-13 10:00
【POJ 3267】 The
Cow
Lexicon
【POJ3267】TheCowLexicon训练计划里把这题排到了topo里。。。。然后我就这么死盯研究了一周topo算法(期间经历了三个人生风波。。。。大物考试高数考试跟模电考试…………)啥不说了……上dp代码…………没错这是个dp!。。。赤果果的dp。。就呢么傻呆呆地研究Topo算法……结果没研究出来。。题意是给一个字符串和m个单词组成的字典,问最少删除几个字母能让这个字符串变成由字典中几个单
ChallengerRumble
·
2015-07-11 18:00
dp
POJ 3673:
Cow
Multiplication
CowMultiplicationTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 12210 Accepted: 8509DescriptionBessieistiredofmultiplyingpairsofnumberstheusualway,sosheinventedherownstyleofmultiplication.Inhe
u010885899
·
2015-07-09 10:00
poj
LiveCD 修复Grub引导
:http://www.cnblogs.com/dcb3688/p/4610652.html/usr/sbin/grub-probe:error:failedtogetcanonicalpathof/
cow
diandu3502
·
2015-06-30 15:00
上一页
38
39
40
41
42
43
44
45
下一页
按字母分类:
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
其他