Description "Luogu3069" "USACO" Solution 由于两个点之间最多可以有$k+1$种牛,而牛的种数是单调的。所以可以用尺取法(区间伸缩法),每次右移右端点后,让左端点不断右移直到牛的种数不大于$k+1$就好了。 Code Note 当需要维护的性质满足区间单调的话, ...
分类:
其他好文 时间:
2018-09-24 21:08:08
阅读次数:
219
题目描述 Farmer John has forgotten to repair a hole in the fence on his farm, and his N cows (1 <= N <= 1,000) have escaped and gone on a rampage! Each mi ...
分类:
其他好文 时间:
2018-09-22 21:22:29
阅读次数:
188
矩阵快速幂+倍增floyd 这道题十分神啊,floyd与矩阵快速幂(思想)结合。 矩阵快速幂的原理与普通快速幂一样,因为矩阵乘法满足交换律。 而这道题是让我们求从s出发恰好经过k条边(k =1; } include include include include include include in ...
分类:
其他好文 时间:
2018-09-22 12:48:16
阅读次数:
174
前言 很多时候我们无法直接定位到某个元素,我们可以先定位它的父元素,通过父元素来找子元素就比较容易 一、子节点 1.以博客园首页的摘要为例:<div class="c_b_p_desc">这个tag为起点 2.那么div这个tag就是父节点 3."摘要: 前言 本篇详细。。。"这个string就是上 ...
分类:
其他好文 时间:
2018-09-20 17:26:01
阅读次数:
198
题目链接:http://poj.org/problem?id=3278 Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He ...
分类:
其他好文 时间:
2018-09-20 01:12:15
阅读次数:
162
Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s ...
分类:
其他好文 时间:
2018-09-19 22:01:08
阅读次数:
166
第一篇博客,格式惨不忍睹。首先感谢一下鼓励我写博客的大佬@ "Titordong" 其次就是感谢一群大佬激励我不断前行@ "Chunibyo" @ "Tiancfq" 因为室友tanty强烈要求出现。 Catch That Cow(POJ3278) BFS入门题,然鹅我还是WA了四五发,因为没注意, ...
分类:
其他好文 时间:
2018-09-18 00:32:19
阅读次数:
174
题目描述 约翰的N (2 <= N <= 10,000)只奶牛非常兴奋,因为这是舞会之夜!她们穿上礼服和新鞋子,别 上鲜花,她们要表演圆舞. 只有奶牛才能表演这种圆舞.圆舞需要一些绳索和一个圆形的水池.奶牛们围在池边站好, 顺时针顺序由1到N编号.每只奶牛都面对水池,这样她就能看到其他的每一只奶牛. ...
分类:
其他好文 时间:
2018-09-16 21:03:44
阅读次数:
156
"题目传送门" 这个题还是个缩点的板子题...... 答案就是size大于1的强连通分量的个数 加一个size来统计就好了 ...
分类:
其他好文 时间:
2018-09-14 22:57:35
阅读次数:
163
redhat 6.5不重启系统添加新的EMC存储盘的步骤
分类:
系统相关 时间:
2018-09-14 17:21:04
阅读次数:
446