摘要: 今天主要是学习了一下DP,三个使用前提:最优子结构、子问题重叠性、无后效性,今后重点练dp题,至少做30题加深理解 这题纯粹为了练习编码速度。#include <iostream>#include <string>using namespace std;int main(){ int c,miles = 0; string a; char b; while(cin>>a && a[0] != '#'){ if (a[0] != '0') { cin>>a>>c>>b; swi 阅读全文
posted @ 2010-11-28 21:33 yangleo 阅读(248) 评论(0) 推荐(0) 编辑