emmmm,重温usaco,然后这个智障模拟题的模拟做法,我WA了10发才对,这就很尴尬了,主要是判断条件出了很多锅,一会这个点WA,一会那个点的,要gg的节奏。 Three farmers rise at 5 am each morning and head for the barn to mil ...
分类:
其他好文 时间:
2017-10-25 11:41:23
阅读次数:
162
You have a necklace of N red, white, or blue beads (3<=N<=350) some of which are red, others blue, and others white, arranged at random. Here are two ...
分类:
其他好文 时间:
2017-10-25 11:24:18
阅读次数:
150
上午考了试,Dreif考到一半突然rush 超市,然后他爆炸了hhh; 我T1玄学做法AC,后来才发现其实就是个冒泡排序233; 下午比较水,讲题的时候效率很低,讲完题做了做T4(USACO 2015 Dec G 的某道迷宫题),细节爆炸,扔给Dreif,他调了半天hhh; 19:27 AC了迷宫题 ...
分类:
其他好文 时间:
2017-10-25 00:32:58
阅读次数:
178
n<=100000的点权树,问每个点子树内有多少个比他大。 方法一:区间第K大!…… 方法二:线段树合并,值为下标,每次把所有的孩子和自己合并起来,然后线段树中直接查找即可。 1 #include<cstring> 2 #include<cstdlib> 3 #include<cstdio> 4 / ...
分类:
其他好文 时间:
2017-10-24 21:07:13
阅读次数:
165
4756: [Usaco2017 Jan]Promotion Counting Description The cows have once again tried to form a startup company, failing to remember from past experience ...
分类:
其他好文 时间:
2017-10-24 19:43:36
阅读次数:
159
【题意】带点权树,统计每个结点子树内点权比它大的结点数。 【算法】线段树合并 【题解】对每个点建权值线段树(动态开点),DFS中将自身和儿子线段树合并后统计。 注意三个量tot,cnt,tots,细心查错。 #include<cstdio> #include<algorithm> #include< ...
分类:
其他好文 时间:
2017-10-24 17:09:28
阅读次数:
177
1594: [Usaco2008 Jan]猜数游戏 Description 为了提高自己低得可怜的智商,奶牛们设计了一个新的猜数游戏,来锻炼她们的逻辑推理能力。 游戏开始前,一头指定的奶牛会在牛棚后面摆N(1 <= N<= 1,000,000)堆干草,每堆有若干捆,并且没有哪两堆中的草一样多。所有草 ...
分类:
其他好文 时间:
2017-10-24 14:12:01
阅读次数:
198
Description The cows have once again tried to form a startup company, failing to remember from past experience that cows make terrible managers!The co ...
分类:
其他好文 时间:
2017-10-23 20:45:10
阅读次数:
157
https://www.luogu.org/problem/show?pid=1360 题目描述 Farmer John's N cows (1 ≤ N ≤ 100,000) share many similarities. In fact, FJ has been able to narrow d ...
分类:
其他好文 时间:
2017-10-22 23:30:07
阅读次数:
255
1009 产生数 2002年NOIP全国联赛普及组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 1009 产生数 2002年NOIP全国联赛普及组 1009 产生数 2002年NOIP全国联赛普及组 时间限制: 1 s 空间限制: 128000 KB 题目 ...
分类:
其他好文 时间:
2017-10-22 22:01:30
阅读次数:
132