码迷,mamicode.com
首页 >  
搜索关键字:buying    ( 115个结果
Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2)B. T-shirt buying
传送门 Description A new pack of n t-shirts came to a shop. Each of the t-shirts is characterized by three integers pi, ai and bi, where pi is the price ...
分类:其他好文   时间:2017-05-27 16:12:01    阅读次数:224
Codeforces Round #408 (Div. 2)ABCD
A. Buying A House 分别向左右枚举,找到符合题意的点,输出最短的长度*10。 #include <bits/stdc++.h> using namespace std; int n, k, s, a[105]; int main() { scanf("%d%d%d", &n, &s, ...
分类:其他好文   时间:2017-04-13 19:59:57    阅读次数:247
codeforces103E Buying Sets
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作。 本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作。 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/转载请注 ...
分类:其他好文   时间:2017-04-05 21:56:07    阅读次数:282
【codeforces 103E】 Buying Sets
http://codeforces.com/problemset/problem/103/E (题目链接) 题意 给出$n$个数,每个数与一个集合相关联。从其中选出最小的若干个数,选出的数的个数与这些数相关联的集合的并集大小相等。 Solution 因为保证了有完全匹配,所以跑出一个完全匹配,这样我 ...
分类:其他好文   时间:2017-04-04 15:50:24    阅读次数:198
BZOJ 1618: [Usaco2008 Nov]Buying Hay
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1618 解:我看了半天觉得很像完全背包,可是又没法按套路来,于是翻了别人的题解,发现真是啊!!(一道神奇的背包) 我们发现也许最终的重量会超过H,但超过的部分绝对会小于maximum(p[i] ...
分类:其他好文   时间:2017-04-03 01:07:08    阅读次数:196
mybatis字段映射枚举类型
在底层使用mybatis的时候,我们可能会需要把表里的字段映射到Java里面的枚举类,现总结下工作中的用法: sku表里一个status_type字段为int类型。(这里是postgresql的脚本) Java里面对应生成的枚举类为: 在配置xml文件之前我们需要为自己的项目建一个工具类: util ...
分类:其他好文   时间:2017-03-21 12:18:44    阅读次数:444
121. Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction ...
分类:其他好文   时间:2017-03-18 20:03:26    阅读次数:158
Codeforces Round #342 (Div. 2) A. Guest From the Past(贪心)
传送门 Description Kolya Gerasimov loves kefir very much. He lives in year 1984 and knows all the details of buying this delicious drink. One day, as you ...
分类:其他好文   时间:2016-11-05 02:48:35    阅读次数:203
Buying Feed, 2010 Nov (单调队列优化DP)
约翰开车回家,又准备顺路买点饲料了(咦?为啥要说“又”字?)回家的路程一共有 E 公里,这一路上会经过 K 家商店,第 i 家店里有 Fi 吨饲料,售价为每吨 Ci 元。约翰打算买 N 吨饲料,他知道商家的库存是足够的,至少所有店的库存总和不会少于 N。除了购买饲料要钱,运送饲料也是要花油钱的,约翰 ...
分类:其他好文   时间:2016-10-20 09:58:55    阅读次数:376
bzoj1618[Usaco2008 Nov]Buying Hay 购买干草*
bzoj1618[Usaco2008 Nov]Buying Hay 购买干草 题意: n种物品,每种无限个,重量为pi,费用为ci,要求总重量超过h的前提费用最小。求最小费用。n≤100,m≤50000。 题解: dp。f[i][j]=min(f[i-1][j],f[i][j-p[i]]+c[i]) ...
分类:其他好文   时间:2016-09-18 22:02:08    阅读次数:120
115条   上一页 1 ... 5 6 7 8 9 ... 12 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!