书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2012年5月13日

输入的最小按键次数

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=2577用动态规划角。on[i]表示在lock为开的时候输入第i个字符时的最小按键次数。off[i]表示在lock为关的时候输入第i个字符时的最小按键次数。View Code #include "iostream"#include "string"using namespace std;#define MAX 105int on[MAX], off[MAX];int main(){ int n; string str; cin>>n; while(n-- 阅读全文

posted @ 2012-05-13 23:03 More study needed. 阅读(325) 评论(0) 推荐(0) 编辑

导航

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!