Cow Relays Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5411 Accepted: 2153 Description For their physical fitness program, N (2 ≤ N ≤ 1 ...
分类:
其他好文 时间:
2016-04-08 19:59:53
阅读次数:
157
Description Farmer John's N (1 <= N <= 50,000) cows are standing in a very straight row and mooing. Each cow has a unique height h in the range 1..2,0 ...
分类:
其他好文 时间:
2016-04-05 23:04:02
阅读次数:
319
题目描述 FJ is surveying his herd to find the most average cow. He wants to know how much milk this ‘median’ cow gives: half of the cows give as much or m... ...
分类:
其他好文 时间:
2016-04-04 22:37:36
阅读次数:
187
SB贪心,一开始还想着用二分,看了眼黄学长的blog,发现自己SB了。。。 最小道路=已选取的奶牛/道路总数。 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 using namespace std; 5 int ...
分类:
其他好文 时间:
2016-04-04 06:45:21
阅读次数:
112
01背包。把一个属性当成费用,另一个属性当成价值。费用可能为负数,处理的时候加上100000就可以了。 ...
分类:
其他好文 时间:
2016-04-03 22:13:25
阅读次数:
160
///POJ 3278 Catch That Cow #include<stdio.h>#include<string.h>#include<iostream>#include<queue>using namespace std; int step[100010];int vis[100010];q ...
分类:
其他好文 时间:
2016-04-03 14:26:57
阅读次数:
124
昨天下午想了好久没想出来,果然是很弱,思考能力低下。 用的类似单调队列的思想,维护一个长度为$k+1$的滑块,每次统计下$ans$就可以了 没了 ...
分类:
其他好文 时间:
2016-03-30 08:14:45
阅读次数:
138
做完1692发现还有弱化版本1640
打板子刷水题大法好,骗访问量大法好#include
#include
#include
#include
#include
#include
#include
#include
#include
#include...
分类:
编程语言 时间:
2016-03-23 09:11:28
阅读次数:
234
secret和guess按位读入,如果相等bull就加1,不相等就在各自统计不同数字出现次数的数组里加1(s_map[i]指secret里数字i出现的次数)。最后s_map和g_map存的是各自string中位置不等的各数值出现的次数,cow等于两个数组中相同位置的最小数。
分类:
其他好文 时间:
2016-03-20 21:22:25
阅读次数:
203