hdu 1572 下沙小面的(2)
摘要:
这题和necklace 类似。。#include <stdio.h>#include <string.h>#include <stdlib.h>#include <algorithm>using namespace std;int map[40][40];int dis[40];int hash[40];int N, M, k, sum;void DFS( int S, int n, int s){ int j; if (n == k) { if (sum > S) sum = S; return ; } for(j = 0; j < 阅读全文
posted @ 2011-08-12 10:57 more think, more gains 阅读(301) 评论(0) 推荐(0) 编辑