ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like ...
分类:
其他好文 时间:
2017-07-25 22:45:45
阅读次数:
241
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Be ...
分类:
其他好文 时间:
2017-07-25 21:25:30
阅读次数:
179
Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n. Each ...
分类:
其他好文 时间:
2017-07-24 17:26:50
阅读次数:
148
Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow ...
分类:
其他好文 时间:
2017-07-23 18:07:46
阅读次数:
149
标记数组(哈希) 1e6的范围,开一个char数组全然能够,有人为1,无人为0,注意边界就可以。最后线性扫描就可以。 时间复杂度,应该是O(n),n为最后结束的时间。 缺点就是……比較慢 /* ID:twd30651 PROG:milk2 LANG:C++ */ #include<iostream> ...
分类:
其他好文 时间:
2017-07-23 10:15:32
阅读次数:
158
题目大意: 有一些集合,求每个集合是多少个集合的真子集 思路: 树状数组 先按照右端点从大到小排序,这样只要考虑之前比它左端点小的出现过几次就可以了 模板题 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> ...
分类:
其他好文 时间:
2017-07-23 10:12:03
阅读次数:
160
题目大意: 一个序列,从这个数列里取任意个数,添加到新的数列里。 对于这个新序列,ans-奇数位的值,+偶数位的值 求最后ans最大值 思路: dp 求对于原数列中的每个数,是奇数不取、奇数取、偶数取、偶数不取的情况分别计算 最后对于最后一个数对四种情况取一下max #include<iostrea ...
分类:
其他好文 时间:
2017-07-22 19:44:21
阅读次数:
159
Layout Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9427 Accepted: 4517 Description Like everyone else, cows like to stand close to thei ...
分类:
其他好文 时间:
2017-07-22 15:44:36
阅读次数:
229
POJ 3190 Stall Reservations贪心 Description Oh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some prec ...
分类:
其他好文 时间:
2017-07-22 13:18:33
阅读次数:
164
很少人知道其实奶牛非常喜欢到洞穴里面去探险。 洞窟里有N(1≤N≤100)个洞室,由M(1≤M≤1000)条双向通道连接着它们.每对洞室间 至多只有一条双向通道.有K(1≤K≤14)个洞室,里面放有1捆干草.牛吃1捆干草,体重指数就会增加1. 贪吃的贝茜要到洞窟里面探险.她希望能吃尽量多的干草,但每 ...
分类:
其他好文 时间:
2017-07-21 10:35:19
阅读次数:
185