Tony's Log

Algorithms, Distributed System, Machine Learning

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2015年6月30日

摘要: If coin order matters, that is, each sequence is unique, the DP function is simple enough to make it 1D DP. But key is that order DOESN'T matter, so w... 阅读全文
posted @ 2015-06-30 05:22 Tonix 阅读(464) 评论(0) 推荐(0)

摘要: class Solution {public: int romanToInt(string s) { std::unordered_map hm; hm['M'] = 1000; hm['D'] = 500; hm['C'] = ... 阅读全文
posted @ 2015-06-30 04:48 Tonix 阅读(145) 评论(0) 推荐(0)

摘要: char dict[] = {'I', 'V', 'X', 'L', 'C', 'D', 'M'};class Solution { public: string pattern(int v, int level) { int offset = int(log10(l... 阅读全文
posted @ 2015-06-30 04:39 Tonix 阅读(132) 评论(0) 推荐(0)