Tony's Log

Algorithms, Distributed System, Machine Learning

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

2015年6月1日

摘要: A relatively more complex regex problem to work on. It is fun!import ren = input()for _ in range(n): str = raw_input() pl = '[+-]?([1-8]?[0-9]([... 阅读全文
posted @ 2015-06-01 13:57 Tonix 阅读(502) 评论(0) 推荐(0)

摘要: Pretty classic greedy problem to work on. Here is how to approach it:1. "the smallest team is as large as possible." actually means, team members shou... 阅读全文
posted @ 2015-06-01 11:13 Tonix 阅读(262) 评论(0) 推荐(0)

摘要: My intuition told me that it is a line-scan process.. and yes it is. First, we sort all (a,b,k) by index\start-end, then we do a line scan. And in C++... 阅读全文
posted @ 2015-06-01 09:57 Tonix 阅读(434) 评论(0) 推荐(0)

摘要: Note this smart observation from Editorial: "M will be either P or Q or (A_i+A_j)/2"..Yea I know, my code is not condense enough..#include #include #i... 阅读全文
posted @ 2015-06-01 08:27 Tonix 阅读(243) 评论(0) 推荐(0)