摘要:
http://poj.org/problem?id=2965搜索没用搜索,按一个大神的算法做的 1 #include <stdio.h> 2 #include <string.h> 3 4 int main() 5 { 6 int i, j, k, a[4][4], sum = 0; 7 char c; 8 memset(a, 0, sizeof(a)); 9 for(i=0; i<4; i++)10 {11 for(j=0; j<4; j++)12 {13 scanf("%c", &c);14 ... 阅读全文
posted @ 2013-05-26 17:12
Yuan1991
阅读(100)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=3660图论,最短路,floyd 1 #include <stdio.h> 2 #define N 123 3 4 const int inf = 1<<29; 5 int n, g[N][N]; 6 7 int min(int x, int y) 8 { 9 return x<y? x: y;10 }11 12 void floyd()13 {14 for(int k=1; k<=n; k++)15 {16 for(int i=1; i<=n; i++)17 {18 ... 阅读全文
posted @ 2013-05-26 11:47
Yuan1991
阅读(109)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=3615图论,最短路,DP,floyd 1 #include <stdio.h> 2 #define N 321 3 4 const int inf = 1<<29; 5 int n, g[N][N]; 6 7 int min(int x, int y) 8 { 9 return x<y? x: y;10 }11 12 int max(int x, int y)13 {14 return x>y? x: y;15 }16 17 void floyd()18 {19 for(int k=1; k<=n; 阅读全文
posted @ 2013-05-26 11:25
Yuan1991
阅读(98)
评论(0)
推荐(0)

浙公网安备 33010602011771号