The Shortest Path Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3164    Accepted Submission(s): 1030 Problem Description There are N cities in the country. Each city is represent by a matrix s…
The Shortest Path Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2440    Accepted Submission(s): 784 Problem Description There are N cities in the country. Each city is represent by a matrix si…
http://acm.hdu.edu.cn/showproblem.php?pid=2807 第一次做矩阵乘法,没有优化超时,看了别人的优化的矩阵乘法,就过了. #include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #define maxn 100 using namespace std; <<; int n,m,t1,x,y; int g[ma…
题目链接: Hdu 4725 The Shortest Path in Nya Graph 题目描述: 有n个点,m条边,每经过路i需要wi元.并且每一个点都有自己所在的层.一个点都乡里的层需要花费c元,问从1到N最小花费? 解题思路: 建图比较楠,刚开始的时候想到拆点,把一个点拆成两个,N+i表示点i所在层,对每个点对自己所在层建双向边,权值为0. 然后相邻层建双向边,权值为c.对w条点之间的边,正常建.但是写出来样例都GG了.发现对于同一层的点,在我建的图中可以免费来回跑,这样好像和题意有些…
HDU - 4725 The Shortest Path in Nya Graph http://acm.hdu.edu.cn/showproblem.php?pid=4725 This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you do not und…
题目链接:pid=3631" style="font-size:18px">http://acm.hdu.edu.cn/showproblem.php?pid=3631 Shortest Path Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3962    Accepted Submission(s): 9…
The shortest path Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1507    Accepted Submission(s): 773 Problem Description There are n points on the plane, Pi(xi, yi)(1 <= i <= n), and xi < x…
he Shortest Path in Nya Graph Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 472564-bit integer IO format: %I64d      Java class name: Main   This is a very easy problem, your task is just calculate el camin…
Description This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you do not understand a word of this paragraph, just move on. The Nya graph is an undirecte…
The Shortest Path in Nya Graph Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 13445    Accepted Submission(s): 2856 Problem Description This is a very easy problem, your task is just calculate…