周赛时遇到的一道比较有意思的题目:Problem StatementThere are N rooms in Maki's new house. The rooms are numbered from 0 to N-1. Some pairs of rooms are connected by bi...
分类:
编程语言 时间:
2015-04-01 11:10:30
阅读次数:
159
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo...
分类:
其他好文 时间:
2015-04-01 01:37:01
阅读次数:
94
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent house...
分类:
其他好文 时间:
2015-03-31 22:34:11
阅读次数:
227
House Robber
Total Accepted: 212 Total
Submissions: 780My Submissions
Question
Solution
You are a professional robber planning to rob houses along a street. Each house has a certa...
分类:
其他好文 时间:
2015-03-31 22:29:10
阅读次数:
193
House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint...
分类:
其他好文 时间:
2015-03-31 21:57:29
阅读次数:
116
http://lp.shm.com.cn/index-htm-m-house-q-hire-a-houseinfo-houseid-503080.htmlhttp://lp.shm.com.cn/index-htm-m-house-q-hire-a-houseinfo-houseid-503095.htmlhttp://lp.shm.com.cn/index-htm-m-house-q-hire-a-houseinfo-houseid-503148.htmlhttp://lp.shm.com.cn/index..
分类:
其他好文 时间:
2015-03-22 06:57:13
阅读次数:
128
Apple TreeTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 20335Accepted: 6182DescriptionThere is an apple tree outside of kaka's house. Every...
分类:
移动开发 时间:
2015-03-21 21:20:31
阅读次数:
249
Problem DescriptionJack the Robber appears again! He just robbed a bank in town and is running away with a huge amount of dollar cash. Senior FBI agen...
分类:
其他好文 时间:
2015-03-21 13:53:35
阅读次数:
153
看题目的Hint 图形就知道题意了,对着图形,稍微观察一下就会发现,每一层需要的卡牌数目为 2 * n + (n - 1)个,然后大致就有个思路,暴力枚举,但是仅仅这样没法子枚举,这个公式 只代表其中一层,不可能对每一层都枚举吧,可以化简一下 公式就是 3 * n - 1,这样就会发现 每次差1就是3的倍数了,然后每一层都差1,如果有i层的话,那么其实就是差了i,这样就很容易想到了,假设共有卡牌...
分类:
其他好文 时间:
2015-03-18 23:28:37
阅读次数:
351