hdu1245 Saving James Bond Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1877 Accepted Submission(s): 356 Problem Description This time let us consider the situation in the movie "Live and…
二级最短路+二级最短路,就是DP过程吧. 代码稍微注释一些,毕竟贴代码不好.. #include<bits/stdc++.h> using namespace std; typedef long long LL; const int INF=0x3f3f3f3f; const int N=4e4+10; struct asd{ int cost; int to; int next; }e[N]; int head[220],tol,tot; int n,m,w[220]; map<str…
标签说的是BFS... 太菜,不知道怎么BFS...是不是spfa写,就叫BFS...感觉不是.... 只是二级最短路的写法,直接搞就很容易了,简单题: #include <bits/stdc++.h> using namespace std; typedef long long LL; const int INF=0x3f3f3f3f; const int N=5e2+10; int val[N]; struct asd{ int w; int to; int next; }; asd q[…
E. Paths and Trees time limit per test: 3 seconds memory limit per test: 256 megabytes input: standard input output: standard output Little girl Susie accidentally found her elder brother's notebook. She has many things to do, more important than sol…