这题一看 就知道 是 完全背包和多重背包的结合题目了;对于买东西的是多重背包,商店是完全背包;这里要用到背包的初始化问题,因为求最小,所以初值要尽量大,大于所有可能的最大值;值得一提的是背包上限是20000,不是读入的T;用两个数组分别记录需要用到的最少货币数,一维就够用了;多重的单调队列好难不懂....
分类:
其他好文 时间:
2014-08-06 22:42:02
阅读次数:
331
由于不清楚来源,题目乱放: Problem 1: Mirrors [Brian Dean and Travis Hance, 2013]Farmer John's cows have been causing too much trouble around the farm, andFJ ther....
分类:
其他好文 时间:
2014-07-27 09:46:22
阅读次数:
552
进来的开发一直都很奇葩,从PC web前端到web后端再到iOS端再到Android端,每一次都是摸了点皮毛就得因为项目需求转战其他平台,想想真觉得不合适。就像从昨天其遇到的这个问题,竟然调了几个小时才确定问题。 下面废话少说了,写trouble shooting。 之前依照网上的教程已经跑...
分类:
移动开发 时间:
2014-07-23 22:29:27
阅读次数:
268
合并排序再枚举。
题意问五个数组中各抽一个加起来 和是否为 0。
开始想用 200*200*200 和 200*200 比。果然TLE了。
后来知道 得 200*200,200*200 ,200 。
先200*200 的枚举,排序,去重。然后三个元素加起来,微调 两个 200*200 的指针。
这题用 %lld 就WA。得用 %I64d 。贡献N多TLE。...
分类:
其他好文 时间:
2014-07-22 23:56:47
阅读次数:
471
If you ever have trouble with a service being stuck in a 'starting' or 'stopping' state, you can run a couple of simple commands to kill the service.1...
Problem Description
Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Mario needs to save his lover. ...
分类:
其他好文 时间:
2014-07-12 17:57:06
阅读次数:
174
1. aam 里加入一个ip的internet 2. iis里不用加上ip,但不要有host name 出现的问题: 1. 当打开站点里会出现这个错误 file not found 2. 当加授予用户权限时,用户加不上去: Sorry, we're having trouble reaching t...
分类:
其他好文 时间:
2014-06-23 07:53:04
阅读次数:
223
情况是这样的,我在写一个类似于Online-Judge的系统,用python很容易实现,编译源程序,运行程序,最后比较程序输出与标准输出得出成绩。现在有个问题,万一程序运行时崩溃,比如出现除0异常,assert失败等等,则在windows下会出现恼人的crash
window。我想要避免它,因为我一...
分类:
其他好文 时间:
2014-06-07 07:11:28
阅读次数:
253
The sound of a mosquito can mean trouble in many
parts of the world.The bite of a mosquito can be deadly.Today, we will hear
about some of the disease...
分类:
其他好文 时间:
2014-05-29 18:03:42
阅读次数:
246
题目链接:uva 10497 - Sweet Child Makes Trouble
题目大意:有个小屁孩很淘气,总是趁父母不在家的时候去拿家具玩,每次拿n个家具玩,但是放回去的时候一定不会将某个物品放回原处,一定要打乱。问说有多少放的方式满足。
解题思路:dp[i]表示说i个数打乱的情况,dp[i]=(dp[i?1]+dp[i?2])?(i?1)每次新增一个数,放在序列的最后一个位置...
分类:
其他好文 时间:
2014-05-26 04:53:50
阅读次数:
255