随笔分类 - 杂
摘要:http://blog.csdn.net/jklongint
阅读全文
摘要:这种情况一般发生在“在静态方法里面使用内部类”测试代码:public class Test { public static void main(String[] args) { A a = new A(1); } class A { int x; public A() {} public A...
阅读全文
摘要:public class Fan { public static void main(String[] args) { Fan fan1 = new Fan(), fan2 = new Fan(); fan1.m...
阅读全文
摘要:dp解法:令dp[i]表示容量为i的背包所能得到的最大价值,考虑在当前物品集合中加入1个新考虑的物品i,则有如下状态转移方程:dp[j] = max(dp[j], dp[j - weight[i]] + value[i])#include using namespace std;const int ...
阅读全文

浙公网安备 33010602011771号