hdu 4640 Island and study-sister(状态压缩dp)
摘要:
先处理前两个学长到达各个点所需要的最少时间,在计算前两个学长和最后一个学长救出所有学妹的最少时间。#include#include#include#includeusing namespace std;const int inf=1000000000;struct node{ int b,d;};struct node2{ int dst,sta; node2(){} node2(int _dst,int _sta) { dst=_dst;sta=_sta; }}q[3000000];int dp[17][1mp[17];void bfs()//建立... 阅读全文
浙公网安备 33010602011771号