题意:n个点,m条边,每条边有一个权值,找一条边数最多的边权严格递增的路径,输出路径长度。解法:先将边权从小到大排序,然后从大到小遍历,dp[u]表示从u出发能够构成的严格递增路径的最大长度。 dp[u] = max(dp[u],dp[v]+1),因为有重复的边权值,所以用dis数组先记录,到不重复...
分类:
其他好文 时间:
2014-08-17 17:00:12
阅读次数:
170
摘要流是过滤流的一种,使用它可以再读取和写入流时获取流的摘要信息(MD5/SHA).使用摘要流包装流时,需要额外传递一个MessageDigest对象,MessageDigest md=MessageDigest.getInstance("MD5");DigestInputStream dis=ne...
分类:
其他好文 时间:
2014-08-15 22:31:49
阅读次数:
344
javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].sty...
分类:
Web程序 时间:
2014-08-15 17:50:29
阅读次数:
250
二分图模板,剩下的就是建图的过程。
int dfs(int a)
{
int i;
for(i=0;i<n;i++)
{
if(!vis[i]&&mapp[a][i])
{
vis[i] = 1;
if(dis[i]==-1||dfs(dis[i]))
{
...
分类:
其他好文 时间:
2014-08-15 16:08:19
阅读次数:
194
打表可以知道到后面增量都一样了,,
推论就是 i 和 i+1 互质
#include
#include
#include
#include
using namespace std;
typedef long long ll;
const ll mx = 120000;
int main() {
int cas = 0;
ll x, k, y, dis, i;...
分类:
其他好文 时间:
2014-08-14 20:45:50
阅读次数:
173
#include #include #include using namespace std;#define N 1005#define INF 0x3f3f3f3fdouble dis[N][N],d[N];double vis[N];double dijkstral(int v0,int n,....
分类:
其他好文 时间:
2014-08-14 19:54:49
阅读次数:
186
二分加最短路#include #include #define N 1005#define INF 0x3f3f3f3fstruct tt{ int h,cost;}dis[N][N];int vis[N],d[N],num =1;int dijkstral(int v0,int t,int ...
分类:
其他好文 时间:
2014-08-14 19:48:19
阅读次数:
298
#include #include #include using namespace std;#define N 1005#define INF 200000000000#define LL __int64LL ma[N][N],d[N],vis[N],dis[N];LL dijkstral(LL ...
分类:
其他好文 时间:
2014-08-14 19:31:09
阅读次数:
197
1.刚刚写了个很长很长的表格,不过设置了width不生效,单独的页面没有继承什么属性呀,为毛不生效?解答:table是有一定宽度的,当超过这个宽度的时候,设置td的width就会失效,除非定义table的width,才能设置td的width。解决2.导出图片:正在研究;不过没有研究出来3.关于dis...
分类:
Web程序 时间:
2014-08-13 18:23:16
阅读次数:
200
.pop_overlay{ width: 100%; height: 100%; background: #c2c2c2; opacity: 0.5; filter:alpha(opacity=50); position: fixed; z-index: 1; left: 0; top:0; dis...
分类:
其他好文 时间:
2014-08-12 16:47:14
阅读次数:
189