从8月初就看到了这题,今天猛然想起来,然后把补上了 ...
分类:
编程语言 时间:
2018-10-09 00:49:09
阅读次数:
134
[USACO12FEB]牛券Cow Coupons(堆,贪心) 题目描述 Farmer John needs new cows! There are N cows for sale (1 p[i]+c[j]$。用一个堆维护用优惠券的牛,令一个堆维护还未选择的牛。每次考虑未选择的牛是用原价买还是“反悔 ...
分类:
其他好文 时间:
2018-10-05 23:26:00
阅读次数:
311
题目描述 Farmer John and his cows are planning to leave town for a long vacation, and so FJ wants to temporarily close down his farm to save money in the ...
分类:
其他好文 时间:
2018-09-30 18:21:01
阅读次数:
188
题目 题目大意 有这么一个电视节目: 你的面前有$3$个门, 其中两扇门里是奶牛, 另外一扇门里则藏着奖品——一辆豪华小轿车。在你选择一扇门之后, 们并不会立即打开。这时, 主持人会给你个提示, 具体方法是打开其中一扇有奶牛的门(不会打开你已经选择的那个门, 即使里面是牛)。接下来你有两种可能的决策 ...
分类:
其他好文 时间:
2018-09-27 22:07:25
阅读次数:
125
Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= 50,000) orde ...
分类:
其他好文 时间:
2018-09-25 17:26:29
阅读次数:
188
题目描述 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
传送门 一道神奇的DP………(鬼知道他为什么在tarjan里面) 一开始可能会考虑贪心或者什么其他神奇的算法,不过还是DP比较靠谱。 我们用f[i]表示摧毁所有i左侧的炸 药包最少需要的能量,用g[i]表示摧毁所有i右侧的炸 药包最少需要的能量。 那么我们只要找到满足j < i,a[i] - a[j ...
分类:
其他好文 时间:
2018-09-20 16:07:47
阅读次数:
172
Description Every cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <= ...
分类:
其他好文 时间:
2018-09-09 18:16:17
阅读次数:
216
Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 40304 Accepted: 16412 Description Every cow's dream is to become the most popular cow in th ...
分类:
其他好文 时间:
2018-09-07 01:06:06
阅读次数:
194
题目描述 In an effort to better manage the grazing patterns of his cows, Farmer John has installed one-way cow paths all over his farm. The farm consists ...
分类:
其他好文 时间:
2018-09-06 10:59:29
阅读次数:
155