2015年8月3日

hdoj1113(字符串map应用)

摘要: #include#include#include#include#include#includeusing namespace std;#define END "XXXXXX"const int SIZE=10000+16;map dic;void Fun_in(){ string s; ... 阅读全文

posted @ 2015-08-03 23:54 vCoders 阅读(131) 评论(0) 推荐(0)

HDOJ1075字典翻译(map应用)

摘要: #include#include#include#include#includeusing namespace std;const int SIZE=10000+16;char book[SIZE];map dic;void fun_in(){ char start[6]={'\0'}; ... 阅读全文

posted @ 2015-08-03 22:18 vCoders 阅读(115) 评论(0) 推荐(0)

HDOJ1114(完全背包)

摘要: #include#include#includeusing namespace std;const int INF=0x30303030;const int SIZE=10000+16;int w[SIZE];int v[SIZE];int dp[SIZE];int main(){ int T... 阅读全文

posted @ 2015-08-03 17:37 vCoders 阅读(136) 评论(0) 推荐(0)

浅谈背包

摘要: 1.01背包for(int i=0; i=w[i]; j--) //从后向前更新 { if(dp[j]=W; j++) //从前向后更新 { if(dp[j]#include#include#includeusing namespace std;const int S... 阅读全文

posted @ 2015-08-03 17:36 vCoders 阅读(172) 评论(0) 推荐(0)

导航

点击右上角即可分享
微信分享提示