Divisibility
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 11001
Accepted: 3933
Description
Consider an arbitrary sequence of integers. One can place +...
分类:
其他好文 时间:
2015-08-05 01:10:57
阅读次数:
106
题意:一条路上有n个地雷,告诉你这n个雷的位置,一个人初始在位置1,这个人每次可以走1个单位或者跳2个单位,概率分别为p和1-p,现在要求这个人安全通过这段路的概率思路:求出安全通过每个雷的概率,再把所有的乘起来即可。要安全通过某个雷(假设在place[i]这个位置),只有从place[i]-1跳两...
分类:
其他好文 时间:
2015-08-04 20:58:12
阅读次数:
105
紫书例题p245Piotr found a magical box in heaven. Its magic power is that if you place any red balloon inside it then, after one hour, it will multiply to ...
分类:
其他好文 时间:
2015-08-04 20:53:39
阅读次数:
253
Given a rotated sorted array, recover it to sorted array in-place.
Have you met this question in a real interview?
Yes
Example
[4, 5, 1, 2, 3] -> [1,
2, 3, 4, 5]
Challenge
...
分类:
其他好文 时间:
2015-08-03 19:14:31
阅读次数:
160
Note: This is an extension of House Robber.
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time...
分类:
其他好文 时间:
2015-08-03 14:50:50
阅读次数:
123
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with cons...
分类:
其他好文 时间:
2015-08-02 21:42:27
阅读次数:
97
DescriptionGeorgia and Bob decide to play a self-invented game. They draw a row of grids on paper, number the grids from left to right by 1, 2, 3, …, and place N chessmen on different grids, as shown i...
分类:
其他好文 时间:
2015-08-01 17:21:22
阅读次数:
114
leetcode -Reverse Linked List IIReverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn...
分类:
其他好文 时间:
2015-08-01 00:52:37
阅读次数:
118
POJ - 2236
Wireless Network
Time Limit: 10000MS
Memory Limit: 65536KB
64bit IO Format: %I64d & %I64u
Submit Status
Description
An earthquake takes place in South...
分类:
Web程序 时间:
2015-07-31 20:24:52
阅读次数:
147
CrowdFlower Winner's Interview: 1st place, Chenglong ChenTheCrowdflower Search Results Relevancecompetition asked Kagglers toevaluate the accuracy of ...