摘要: DescriptionYou are givena txt file, which is performance logs of a single-threaded program.Each line has three columns as follow:[Function Name] [Time... 阅读全文
posted @ 2015-08-17 20:13 HaruHaru 阅读(196) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe numberic keypad on your mobile phone looks like below:1 2 34 5 67 8 9 0Suppose you are holding your mobile phone with single hand. You... 阅读全文
posted @ 2015-08-16 23:51 HaruHaru 阅读(387) 评论(0) 推荐(0) 编辑
摘要: DescriptionRecently Little Hi started to like astronomy and downloaded the pictures of K constellations. He wonders how many of them he can spot in th... 阅读全文
posted @ 2015-04-07 17:08 HaruHaru 阅读(345) 评论(1) 推荐(0) 编辑
摘要: DescriptionEveryday Littile Hi and Little Ho meet in the school cafeteria to have lunch together. The cafeteria is often so crowded that two adjacent ... 阅读全文
posted @ 2015-04-07 13:05 HaruHaru 阅读(304) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a directed graph containing n vertice (numbered from 1 to n) and m edges. Can you tell us how many different Hamiltonian Cycles are t... 阅读全文
posted @ 2015-04-06 20:02 HaruHaru 阅读(585) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2015-04-06 14:52 HaruHaru 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 传送门:hihoCoder #1086 Browser Caching实现 LRU(Least Recently Used) Cache 即可参考:http://www.cs.uml.edu/~jlu1/doc/codes/lruCache.htmlSolution: 1 #include 2... 阅读全文
posted @ 2015-03-27 17:14 HaruHaru 阅读(405) 评论(0) 推荐(0) 编辑
摘要: DescriptionYou are given two sequences a and b which may contain repeated numbers. A pair (i,j) is good when aiis picked from the first sequence and b... 阅读全文
posted @ 2015-03-25 18:32 HaruHaru 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 传送门http://hihocoder.com/problemset/problem/1036Solution: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 struct Nod... 阅读全文
posted @ 2015-03-19 20:53 HaruHaru 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Problem:DescriptionYour task is to judge whether the input is a legal regular expression.A regular expression is defined as follow:1: 0 and 1 are both... 阅读全文
posted @ 2015-03-08 20:38 HaruHaru 阅读(315) 评论(0) 推荐(0) 编辑