上一页 1 2 3 4 5 6 7 ··· 39 下一页
摘要: /*贪心WA一发。。二分枚举加的数赛后发现直接暴力枚举1到1000也是可以的*//************************************************* Author :Powatr* Created Time :2015-8-30 0:58:45* Fi... 阅读全文
posted @ 2015-08-30 15:04 Painting、时光 阅读(149) 评论(0) 推荐(0) 编辑
摘要: /*写搜索WA了。。赛后发现直接暴力不会超啊,,,*//************************************************* Author :Powatr* Created Time :2015-8-30 14:55:10* File Name ... 阅读全文
posted @ 2015-08-30 15:02 Painting、时光 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1.object 上帝类 所有父类的子类在每一个类中都隐藏有super() 最终父类都是指向object 类可以利用这个实现多态 instanceof2.内部类 顾名思义,即一个类里面的类,为了增加代码的简洁性,使一个功能可以被持续使用class A{ class B{ }}当然如果... 阅读全文
posted @ 2015-08-29 22:33 Painting、时光 阅读(117) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2096dp[i][j] 表示 已经侵入了i个子系统,已经拥有了j种类的期望状态转移方程 dp[i][j] = dp[i][j]*(i*j)/(n*s) + dp[i+1][j]*(n-i)*j/(n*s) + dp[i][j+1]*i*(s-j)... 阅读全文
posted @ 2015-08-28 21:32 Painting、时光 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 不能处理有环的图void SPFA(){ memset(vis, false, sizeof(vis)); vis[1] = true; for(int i = 1; i d[u] + w){ d[v] = d[u] + w; ... 阅读全文
posted @ 2015-08-26 16:26 Painting、时光 阅读(103) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5294SPFA:Bellman_Ford的队列优化算法无法处理带负环的图复杂度O(kE) k #include #include #include #include #include #include #inclu... 阅读全文
posted @ 2015-08-26 16:17 Painting、时光 阅读(155) 评论(0) 推荐(0) 编辑
摘要: java语言的三个特征封装,继承,以及多态多态的概念:一个对象能被多个类(必须有继承关系)所定义Cat cat = new Animal也能Cat cat = new CatAniamal 是 Cat 的父类 class Cat extends Animal这里就有个区分对于非静态量,编译看左边这个... 阅读全文
posted @ 2015-08-26 10:12 Painting、时光 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 再说继承:继承是类与类之间的一种关系,对于一个参数,在继承之后,会在子类中隐藏自动的加上一个代码块super()关键字:super 原本学了一个this关键字,在复习一下,this关键字是该类直接调用对象进行操作,而super也差不多,只是调用的是父类为什么要有这样一个代码块super()/this... 阅读全文
posted @ 2015-08-25 19:43 Painting、时光 阅读(105) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4336转自http://www.cnblogs.com/zhj5chengfeng/archive/2013/03/02/2939601.html做法分析由于卡片最多只有 20 种,使用状态压缩,用 0 表示这种卡... 阅读全文
posted @ 2015-08-25 18:33 Painting、时光 阅读(165) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4334二分T。。/************************************************* Author :Powatr* Created Time :2015-8-25 ... 阅读全文
posted @ 2015-08-25 17:54 Painting、时光 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 39 下一页