2013年12月12日

摘要: #include using namespace std;const int N = 10000 + 5;int dp[N], pos[26];string longestSubstr(string ss){ if (ss.length() == 0) return ""; for (int i = 0; i dp[i - 1] + 1) dp[i] = dp[i - 1] + 1; pos[ss[i] - 'a'] = i; } // output ans int max = 1; int idx = 0; ... 阅读全文
posted @ 2013-12-12 07:16 joy32812 阅读(225) 评论(0) 推荐(0)

导航