码迷,mamicode.com
首页 >  
搜索关键字:visit    ( 1001个结果
HDU 4607 Park Visit(树的直径)
题目大意:给定一棵树,让求出依次访问k个点的最小花费,每条边的权值都为1.思路:如果能一直往下走不回来,那么这个路径肯定是最小的,这就取决于给定的k,但是怎么确定这个能一直走的长度呢,其实这个就是树的直径,也叫作最长简单路径。找出来这个直径之后,只需和k比较一下就能确定走多少步。设直径为maxx,如...
分类:其他好文   时间:2015-09-02 20:44:04    阅读次数:163
hdu 5423 Rikka with Tree
六花和裕太又开始秀恩爱了!每次看到这种题目都会受到暴击............. 昨晚随意的写了个dfs结果终评给挂掉了,今天从新用bfs写了一遍 #include #include #include #define maxn 1005 using namespace std; int n; vectormapp[maxn]; int visit[maxn]; void init() { f...
分类:其他好文   时间:2015-08-30 15:56:24    阅读次数:144
Webdriver API (二)
(转载)1.3 打开测试页面对页面对测试,首先要打开被测试页面的地址(如:http://www.google.com),web driver 提供的get方法可以打开一个页面: // And now use thedriver to visit Google driver.get("http://....
分类:Windows程序   时间:2015-08-27 20:47:27    阅读次数:625
hdu 1596 find the safest road
水题,Dijkstra #include #include #define maxn 1010 using namespace std; int n,sx,sy; double vaule[maxn][maxn]; int visit[maxn]; void init() { } void input() { for(int i=1;i<=n;i++) { for(int j=1;...
分类:其他好文   时间:2015-08-27 18:54:14    阅读次数:120
hdu 1879 继续畅通工程
如果已经建好,那就把vaule的值标记为0,然后模板走起,然后就没有然后了 数据量有点大,没关闭缓冲区TLE #include #include #define maxn 105 using namespace std; int n; const int inf=1<<31-1; vectormapp[maxn]; int vaule[maxn][maxn]; int visit[maxn];...
分类:其他好文   时间:2015-08-26 07:07:30    阅读次数:204
hdu 1301 Jungle Roads
最小生成树裸题,懒得写,直接模板 #include #include #include #include #define inf 1<<30 #define maxn 30 using namespace std; int n; vectormapp[maxn]; int vaule[maxn][maxn]; int visit[maxn]; void prim() { int d[max...
分类:其他好文   时间:2015-08-26 01:51:32    阅读次数:161
hdoj2680 Choose the best route
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10761    Accepted Submission(s): 3484 Problem Description One day , Kiki wants to visit ...
分类:其他好文   时间:2015-08-20 22:37:55    阅读次数:202
Choose the best route HDU杭电2680【dijkstra算法】
http://acm.hdu.edu.cn/showproblem.php?pid=2680 Problem Description One day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her friend’s home ...
分类:编程语言   时间:2015-08-17 23:49:04    阅读次数:183
【3】依照django官网:创建一个web app
1 Creating an admin user $ python manage.py createsuperuser        UserName: wuwh        Password:   ganbare 2  Start the development server¶ $ python manage.py runserver 8088 visit :h...
分类:移动开发   时间:2015-08-17 01:03:31    阅读次数:237
BestCoder#51
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 bool visit[10100000]; 7 int prime[10000000]; 8 9 10 void init_prim()11 {12 ...
分类:其他好文   时间:2015-08-16 18:02:17    阅读次数:146
1001条   上一页 1 ... 74 75 76 77 78 ... 101 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!