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
LiveCD 修复Grub引导
:http://www.cnblogs.com/dcb3688/p/4610652.html/usr/sbin/grub-probe:error:failedtogetcanonicalpathof/
cow
diandu3502
·
2015-06-30 15:00
Catch That
Cow
CatchThatCowTimeLimit:2000MS MemoryLimit:65536KTotalSubmissions:58072 Accepted:18061DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤1
huayunhualuo
·
2015-06-29 16:00
Poj 3278 Catch That
Cow
CatchThatCowTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 58054 Accepted: 18053DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsatapoint N
Grit_ICPC
·
2015-06-27 16:00
bfs
[POJ_3278]Catch That
Cow
TimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 58049 Accepted: 18049DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsatapoint N (0≤ N ≤100,0
saberhao
·
2015-06-26 15:00
算法
poj
bfs
[Poj 3268][Usaco2007 Feb]
Cow
Party奶牛派对
[Usaco2007Feb]CowParty奶牛派对时间限制:1Sec内存限制:128MB题目描述农场有N(1≤N≤1000)个牛棚,每个牛棚都有1只奶牛要参加在X牛棚举行的奶牛派对.共有M(1≤M≤100000)条单向路连接着牛棚,第i条踣需要Ti的时间来通过.牛们都很懒,所以不管是前去X牛棚参加派对还是返回住所,她们都采用了用时最少的路线.那么,用时最多的奶牛需要多少时间来回呢?输入第1行:三
slongle_amazing
·
2015-06-21 16:00
poj2184
Cow
Exhibition
Description"Fatanddocile,biganddumb,theylooksostupid,theyaren'tmuchfun..."-CowswithGunsbyDanaLyonsThecowswanttoprovetothepublicthattheyarebothsmartandfun.Inordertodothis,Bessiehasorganizedanexhibition
Kirito_Acmer
·
2015-06-20 14:00
背包DP
poj 3270
Cow
Sorting 【置换群】【求 把一个序列变成升序 所需代价】
CowSortingTimeLimit:2000MS MemoryLimit:65536KTotalSubmissions:6364 Accepted:2462DescriptionFarmerJohn'sN(1≤N≤10,000)cowsarelineduptobemilkedintheevening.Eachcowhasaunique"grumpiness"levelintherange1..
chenzhenyu123456
·
2015-06-14 14:00
poj 3268 Silver
Cow
Party(SPFA)
#include #include #include #include usingnamespacestd; constintinf=1to]>(dist[u]+ptr->w)) { dist[ptr->to]=dist[u]+ptr->w; if(inq[ptr->to]==0) { q[t]=ptr->to; t++; inq[ptr->to]=1; } } ptr=ptr->next; }
xinag578
·
2015-06-14 11:00
POJ3623:Best
Cow
Line, Gold(后缀数组)
DescriptionFJisabouttotakehis N (1≤ N ≤30,000)cowstotheannual"FarmeroftheYear"competition.Inthiscontesteveryfarmerarrangeshiscowsinalineandherdsthempastthejudges.Thecontestorganizersadoptedanewregistr
libin56842
·
2015-06-08 22:00
poj
后缀数组
poj 3045
Cow
Acrobats(灵活题,推论)
Input*Line1:AsinglelinewiththeintegerN. *Lines2..N+1:Linei+1describescowiwithtwospace-separatedintegers,W_iandS_i. Output*Line1:Asingleinteger,givingthelargestriskofallthecowsinanyoptimalorderingthatm
cacyth
·
2015-06-07 19:00
疯狂Java学习笔记(81)-----------并发容器之CopyOnWriteArrayList
Java并发编程:并发容器之CopyOnWriteArrayList(转载)原文链接:http://ifeve.com/java-copy-on-write/Copy-On-Write简称
COW
,是一种用于程序设计中的优化策略
u011225629
·
2015-06-06 12:00
Linux学习笔记(06-04)创建进程
copy-on-write(
COW
写时复制)技术:
s651665496
·
2015-06-04 13:00
POJ 3045
Cow
Acrobats (最大化最小值)
题目链接:clickhere~~【题目大意】给你n头牛叠罗汉,每头都有自己的重量w和力量s,承受的风险数rank就是该牛上面所有牛的总重量减去该牛自身的力量,题目要求设计一个方案使得所有牛里面风险最大的要最小。【解题思路】:按照w+s贪心放置,越大的(注意是w+s之和)越在下面。不难证明:如果最优放置时,相邻两头牛属性分别为w1,s1,w2,s2,第一头牛在第二头上面,sum为第一头牛上面的牛的体
u013050857
·
2015-06-04 12:00
排序
ACM
poj3660
Cow
Contest(Floyd-Warshall方法求有向图的传递闭包)
题目链接题意:有n头牛,给你m对关系(a,b)表示牛a能打败牛b,求在给出的这些关系下,能确定多少牛的排名。分析:在这呢先说一下关系闭包:关系闭包有三种:自反闭包(r),对称闭包(s),传递闭包(t)。先画出R的关系图,再画出r(R),s(R),t(R)的关系图。我们今天用的是传递闭包。仅作为个人理解传递闭包:关系之间具有传递性(例如a>b,b>c,那么a>c),在那些已给出的关系基础上,通过传递
wangdan11111
·
2015-06-01 22:00
floyd
传递闭包
POJ_2376_Cleaning Shifts(贪心)
MemoryLimit:65536KTotalSubmissions:12788 Accepted:3312DescriptionFarmerJohnisassigningsomeofhisN(1=
cow
jhgkjhg_ugtdk77
·
2015-05-28 19:00
Algorithm
sort
ACM
poj
greedy
POJ - 3278 - Catch That
Cow
(BFS)
题目传送:CatchThatCow思路:BFS找最小步数,用一个结构体存下当前结点的数值以及当前步数AC代码:#include #include #include #include #include #include #include #include #include #include #include #include #include #include #defineLLlonglong #
u014355480
·
2015-05-22 19:00
ACM
poj
bfs
hdu 2838
Cow
Sorting 树状数组
hdu2838 《CowSorting》这题本来兴高采烈的想用java做一遍,结果做出来之后无限超内存,真是啊,做题的时候java这种东西还是轻易不要动了。还有感觉要把数字都要离散化的,结果后台数据不需要离散化。 题意:给一个n代表n个牛,然后再给n个数我觉得是n以内的数(包括n)。虽然体面上没说。然后只能相邻两个数字交换位置,会让牛产生怒气值,值为互相移动的两个牛的编号值相加的和,
Flaergwe
·
2015-05-21 19:35
数组
HDU
树状
hdu 2838
Cow
Sorting 树状数组
hdu2838《CowSorting》这题本来兴高采烈的想用java做一遍,结果做出来之后无限超内存,真是啊,做题的时候java这种东西还是轻易不要动了。还有感觉要把数字都要离散化的,结果后台数据不需要离散化。题意:给一个n代表n个牛,然后再给n个数我觉得是n以内的数(包括n)。虽然体面上没说。然后只能相邻两个数字交换位置,会让牛产生怒气值,值为互相移动的两个牛的编号值相加的和,求把牛按从小到大排
Flaergwe
·
2015-05-21 19:35
数组
树状
hdu
树状数组
hdu 2838
Cow
Sorting 树状数组
hdu2838 《CowSorting》这题本来兴高采烈的想用java做一遍,结果做出来之后无限超内存,真是啊,做题的时候java这种东西还是轻易不要动了。还有感觉要把数字都要离散化的,结果后台数据不需要离散化。 题意:给一个n代表n个牛,然后再给n个数我觉得是n以内的数(包括n)。虽然体面上没说。然后只能相邻两个数字交换位置,会让牛产生怒气值,值为互相移动的两个牛的编号值相加的和,
Flaergwe
·
2015-05-21 19:06
数组
HDU
树状
hdu 2838
Cow
Sorting 树状数组
hdu2838《CowSorting》这题本来兴高采烈的想用java做一遍,结果做出来之后无限超内存,真是啊,做题的时候java这种东西还是轻易不要动了。还有感觉要把数字都要离散化的,结果后台数据不需要离散化。题意:给一个n代表n个牛,然后再给n个数我觉得是n以内的数(包括n)。虽然体面上没说。然后只能相邻两个数字交换位置,会让牛产生怒气值,值为互相移动的两个牛的编号值相加的和,求把牛按从小到大排
Flaergwe
·
2015-05-21 19:06
数组
树状
hdu
字典序最小问题——Best
Cow
Line
#include #include usingnamespacestd; #defineMAX_N2000 intN; charS[MAX_N+1]; voidsolve() { inta=0,b=N-1; while(aS[b-i]) { left=false; break; } } if(left) putchar(S[a++]); else putchar(S[b--]); }
NoMasp
·
2015-05-19 14:00
POJ3045
Cow
Acrobats (贪心)
CowAcrobatsTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 3207 Accepted: 1264DescriptionFarmerJohn'sN(1 #include #include usingnamespacestd; typedef__int64ll; constintmaxn=50000+10; intn; st
u013068502
·
2015-05-16 10:00
poj
POJ 3278 catch that
cow
CatchThatCowTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 54696 Accepted: 17101DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsatapoint N
wust_ZJX
·
2015-05-15 20:00
BFS —— POJ 3278 Catch That
Cow
对应POJ题目:点击打开链接CatchThatCowTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 54686 Accepted: 17096DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hesta
u013351484
·
2015-05-14 21:00
POJ 2018 Best
Cow
Fences
BestCowFencesTimeLimit: 1000MS MemoryLimit: 30000KTotalSubmissions: 9840 Accepted: 3177DescriptionFarmerJohn'sfarmconsistsofalongrowofN(1 #include #include usingnamespacestd; constintmaxn=1e5+10; ints
Houheshuai
·
2015-05-13 21:00
POJ 3045
Cow
Acrobats (贪心)
CowAcrobatsTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 3192 Accepted: 1260DescriptionFarmerJohn'sN(1=w1-s2,即w2+s2>=w1+s1,所以和最大的就该老实的在下面呆着==!AC代码如下:// //POJ3045CowAcrobats // //CreatedbyTaoS
lwt36
·
2015-05-13 17:00
POJ---3278-Catch That
Cow
(BFS/deque)
CatchThatCowTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 40350 Accepted: 12560DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsatapoint N
qq978874169
·
2015-05-08 21:00
C++
bfs
POJ 3660
Cow
Contest
CowContestTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 7628 Accepted: 4243DescriptionN (1≤ N ≤100)cows,convenientlynumbered1..N,areparticipatinginaprogrammingcontest.Asweallknow,somecowscode
wust_ZJX
·
2015-05-08 21:00
Cow
Program(dp, 记忆化搜索)
FarmerJohnhasjustgiventhecowsaprogramtoplaywith!Theprogramcontainstwointegervariables,xandy,andperformsthefollowingoperationsonasequencea1, a2, …, anofpositiveintegers:Initially,x = 1andy = 0.If,after
Guard_Mine
·
2015-05-06 16:00
dp
poj 动态规划DP - 2018 Best
Cow
Fences
这道题目我一开始的思路是用二维DP,结果TLE了。后来换了个思路,终于AC了。不需要判断所有的情况,我们用dp[i]表示前i个牛圈中最大的牛数,而这个i首先必须>=限制的牛圈树f。用num[i]表示dp[i]中包含了多少牛圈。我们可以知道,dp[i]= sum[i]-sum[i-f])/f or dp[i-1]+data[i], 前一个代表到i为止前f个牛圈的牛数,后一个代表前i-1个牛圈中最大
u010006643
·
2015-05-05 16:00
动态规划
poj
poj3278 Catch That
Cow
DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100,000)onanumberlineandthecowisatapointK(0≤K≤100,000)onthesamenumberline.FarmerJohnh
Herumw
·
2015-05-04 07:27
搜索
搜索
poj3278 Catch That
Cow
DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.Hestartsatapoint N (0≤ N ≤100,000)onanumberlineandthecowisatapoint K (0≤ K ≤100,000)onthesamenumberline.Far
Kirito_Acmer
·
2015-05-04 07:00
搜索
Catch That
Cow
--POJ3278
Description Farmer John has been informed of the location of a fugitive
cow
and wants to catch her
·
2015-05-02 14:00
catch
C_Catch That
Cow
DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100,000)onanumberlineandthecowisatapointK(0≤K≤100,000)onthesamenumberline.FarmerJohnh
highmath_Final
·
2015-04-30 20:00
Silver
Cow
Party.(POJ-3268)
本来想用Floyd算法,可惜超时,毕竟复杂度太高,而且并没有必要求出任意两点间的最短距离。求两点间的最短路有两种方法,dijkstra和Bellman,前者不能有负圈,后者可以有负圈,另外,Floyd也可以求带负圈的最短距离。我们只需要求出x到其他个点的最短距离和个点到它的最短距离就行了。当然,我所写的还求了很多多余的量,是可以优化的。#include #include #include #inc
weizhuwyzc000
·
2015-04-30 19:00
ACM
poj
JOS fork函数 实现机制分析
JOSfork函数实现机制分析简直有点小鸡冻哇...介个地方之前困惑了好一阵...现在叨叨关于fork那些事儿文章会着重分析fork的两种实现策略: 1.不使用
COW
策略实现dumbfork
u011368821
·
2015-04-30 09:00
【POJ】 2182 - Lost Cows 【线段树入门】
65536KTotalSubmissions: 9727 Accepted: 6261DescriptionN(2 ints[100000],ans[100000]; structseg{ intl,r; intlen; }
cow
xianyun2009
·
2015-04-25 20:00
poj
lost
cows
2182
POJ2184---
Cow
Exhibition(01背包变形)
Description“Fatanddocile,biganddumb,theylooksostupid,theyaren’tmuchfun…”-CowswithGunsbyDanaLyonsThecowswanttoprovetothepublicthattheyarebothsmartandfun.Inordertodothis,Bessiehasorganizedanexhibitionth
Guard_Mine
·
2015-04-21 18:00
dp
Copy On Write(写时复制)
COW
技术初窥:在Linux程序中,fork()会产生一个和父进程完全相同的子进程,但子进程在此后多会exec系统调用,出于效率考虑,linux中引入了“写时复制“技术,也就是只有进程空间的各段的内容要发生变化时
doc_sgl
·
2015-04-19 15:31
cow
copy
on
write
instance
C/C++
POJ2375
Cow
Ski Area (添最少边构造强连通分量的某个与入度出度相关的结论)
题意:本题描述了一片滑雪场,并且规定奶牛从一个点只能向它相邻的并且高度不大于它的点运动,现在想要在某些点对之间加上缆车使得奶牛也可以从较低点到达较高点,问最少需要多少辆这样的缆车就可以使得奶牛可以从任意一个点运动到滑雪场的每个角落。思路:即问至少加多少条边使图变成强联通图,先缩点成DAG。不难知道强连通分量的所有节点的入度和出度均不为0,可以统计DAG上的入度和出度为0的个数分别是a,b。然后答案
kalilili
·
2015-04-19 01:00
Cow
Bowling(POJ-3176)
基础DP。状态转移方程为:d[i][j]=a[i][j]+(i==n?0:max(dp(i+1,j),dp(i+1,j+1)));i是在第i层,j是在该层的第几个数。这一层的最优解取决于下一层的情况,而每一层都有两个决策,条件 if(d[i][j]>=0)returnd[i][j];用来剪枝。#include #include #include #include #include usingnam
weizhuwyzc000
·
2015-04-16 16:00
ACM
poj
POJ3278 Catch That
Cow
BFS
题目大意:FJ发现了一只逃亡的奶牛想要把它抓回来,已知FJ在N点,奶牛在同一水平线上的K点,FJ可以在一个时间单位内向左或向右移动一步,也可以有x点移动到2x点。现在问你FJ要抓回奶牛最少需要多少时间。分析:要搜索最少时间,果断BFS,把方向数组换成X+1,X-1,X*2就行了。实现代码如下:#include #include #include #include usingnamespacestd
AC_Gibson
·
2015-04-14 12:00
poj 3270
Cow
Sorting (置换群)
题意:有n头牛,无序的排成一排,每个牛有一个权值w,现在要将牛按权值递增排序,每次可以交换两头牛的位置并且所需的代价是这两头牛的权值和,问使得牛权值按递增排序需要的最代价。题解:置换群的应用,每轮交换的最小代价要么就是指环内部取一个最小的作为踏板交换,要么就是在外部找一个最小的作为踏板交换,去两者的最小值。dfs出每个轮换,然后对每个轮换按上诉操作,最终累加得最优解。#include #inclu
My_ACM_Dream
·
2015-04-07 21:00
Catch That
Cow
CatchThatCowTimeLimit:2000MSMemoryLimit:65536KTotalSubmissions:52614Accepted:16499DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediately.HestartsatapointN(0≤N≤100
Ash_Zheng
·
2015-03-30 14:00
POJ - 3673
Cow
Multiplication
POJ-3673CowMultiplicationDescriptionBessieistiredofmultiplyingpairsofnumberstheusualway,sosheinventedherownstyleofmultiplication.Inherstyle, A*B isequaltothesumofallpossiblepairwiseproductsbetweenthed
axiqia
·
2015-03-28 23:00
POJ 3268 Silver
Cow
Party (dijkstra来回最短路)
SilverCowPartyTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 13576 Accepted: 6123DescriptionOnecowfromeachof N farms(1≤ N ≤1000)convenientlynumbered1..N isgoingtoattendthebigcowpartytobeheldat
lwt36
·
2015-03-23 21:00
聊聊并发(九)Java中的Copy-On-Write容器
Copy-On-Write简称
COW
,是一种用于程序设计中的优化策略。
陶邦仁
·
2015-03-23 15:00
F - Catch That
Cow
-BFS-只计次不求路径
#include#include#include#include#include#include#includeusingnamespacestd;queueqq;inttrack[100010];intn;intk;boolvis[100010];intbfs(){while(!qq.empty()){intnn=qq.front();qq.pop(); //获取头后即可剔除;if(nn
viphong
·
2015-03-20 15:00
poj 3617 Best
Cow
Line
http://poj.org/problem?id=3617 #include<cstdio> #include<cstring> #include<iostream> #include<string> #include<algorithm> using namespace std; const int MAX_N=2
·
2015-03-17 13:00
poj
POJ 2375
Cow
Ski Area (强连通分量)
题目地址:POJ2375对每个点向与之相邻并h小于该点的点加有向边。然后强连通缩点。问题就转化成了最少加几条边使得图为强连通图,取入度为0和出度为0的点数的较大者即可。注意,当强连通分量只有一个的时候,答案是0,而不是1.代码如下:#include #include #include #include #include #include #include #include #include usi
u013013910
·
2015-03-12 19:00
编程
算法
ACM
强连通分量
上一页
39
40
41
42
43
44
45
46
下一页
按字母分类:
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
其他