码迷,mamicode.com
首页 >  
搜索关键字:i think i need a hou    ( 4897个结果
有关String的转换的一篇好文章
Pay Close Attention - String Handling I need to make a detour for a few moments, and discuss how to handle strings in COM code. If you are familiar wi...
分类:其他好文   时间:2014-09-11 19:15:22    阅读次数:455
ZOJ 3812 We Need Medicine 01背包+位优化
题目链接:点击打开链接 #include #include #include #include #include typedef unsigned long long ll; using namespace std; const int N = 400 + 1; const int M = 200000 + 1; int t[N], w[N], g[51][M], ans[N], de...
分类:其他好文   时间:2014-09-10 23:57:41    阅读次数:502
ZOJ 3812 We Need Medicine(牡丹江网络赛D题)
ZOJ 3812 We Need Medicine 题目链接 思路:dp[i][j][k]表示第i个物品,组成两个值为j和k的状态,这样会爆掉,所以状态需要转化一下 首先利用滚动数组,可以省去i这维,然后由于j最大记录到50,所以可以把状态表示成一个二进制数s,转化成dp[k] = s,表示组成k状态能组成s,这样空间复杂度就可以接受了,然后这题时限还可以,就这样去转移,然后记录...
分类:其他好文   时间:2014-09-10 22:33:31    阅读次数:261
ZOJ 3812 We Need Medicine(dp、背包、状态压缩、路径记录)
参考:http://blog.csdn.net/qian99/article/details/39138329参考的链接里说明得很好,注释也很好。。。thanks for sharing朴素的想法不难,dp[i][j][k]类似背包做法即可。但朴素思想复杂度过高。这里主要是用到 dif 那个变量,只...
分类:其他好文   时间:2014-09-10 19:07:00    阅读次数:255
zoj 3812 We Need Medicine(01背包)
题目链接:zoj 3812 We Need Medicine 题目大意:有n中化学成分,每种成分要么选取重量Wi,获得Ti的TEV值,要么不取,获得0的TEV值。现在对于每种病 毒,要求配置质量为Mi的药物,并且TEV值为Si,求化学成分组成。 解题思路:看了别人的题解,以前居然不知道背包转移可以用二进制。 因为质量总共才50,所以用一个long long的二进制数表示说哪...
分类:其他好文   时间:2014-09-10 17:46:10    阅读次数:171
Analytics For Hackers: How To Think About Event Data
There’s this new and really powerful type of data: event data. Well, it’s not really new. I bet you are already familiar with event data, even if you ...
分类:其他好文   时间:2014-09-10 15:42:40    阅读次数:322
difference between append and appendTo
if you need append some string to element and need set some attribute on these string at the same time,you'b better use appendTo funtion.because you c...
分类:移动开发   时间:2014-09-10 12:14:20    阅读次数:183
WP8.1 页面跳转,overwrite后退键
In 8.1 we use the below code to navigate between pages:this.Frame.Navigate(typeof(PivotPage));In 8.1 we need to use the event to add hardware back eve...
分类:其他好文   时间:2014-09-09 22:43:59    阅读次数:226
zoj 3812 We Need Medicine (dp 状压)
先贴一下转载的思路和代码,,,:http://blog.csdn.net/qian99/article/details/39138329状压dp博大精深啊,以后看到n 2 #include 3 #include 4 #include 5 #include 6 #include 7 #in...
分类:其他好文   时间:2014-09-09 15:09:58    阅读次数:239
2014牡丹江网络预选赛D题(状压DP)zoj3812
We Need Medicine Time Limit: 10 Seconds      Memory Limit: 65536 KB      Special Judge A terrible disease broke out! The disease was caused by a new type of virus, which will lead to lethal lymp...
分类:其他好文   时间:2014-09-09 12:55:12    阅读次数:301
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!