摘要:
//枚举+贪心+优先队列
//最有的方案肯定是从起点走到某个点终止,然后在这条路上通过贪心选择最优的选择(每个点应停留的时间)。最后通过比较得出最优的方案
#include <iostream>
#include <queue>
#include <cstdio>
#include <cstring>
using namespace std;
const int maxn=26;
int t_spent[maxn],eve[maxn][maxn],cost[maxn],d[maxn];
int n,h;
struct node
{ int num 阅读全文
posted @ 2012-12-21 17:13
LJ_COME!!!!!
阅读(139)
评论(0)
推荐(0)
摘要:
#include <iostream>
#include <string>
#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn=55;
string f[maxn];
int n;
bool cmp(string a,string b)
{ return a+b>b+a;
}
int main()
{ while(cin>>n&&n) { for(int i=0;i<n;i++) cin>>f[i] 阅读全文
posted @ 2012-12-21 17:11
LJ_COME!!!!!
阅读(144)
评论(0)
推荐(0)

浙公网安备 33010602011771号