http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3754
开始看错题意了,以为没翻到a,b,c时要在原来的基础上加a+b+c,按我的意思推出来一个公式,没想到样例还过了,简直无法debug。
公式很好推,设dp[i]表示当前为i分时到达目标状态需要投掷的期望,可转移到两个状态dp[0]和dp[i+k]。设转移...
分类:
其他好文 时间:
2014-09-07 11:06:05
阅读次数:
220
Given an undirected weighted graph G , you should find one of spanning trees specified as follows.
The graph G is an ordered pair (V, E) , where V is a set of vertices {v1, v2,..., vn} and E is
a...
分类:
其他好文 时间:
2014-09-06 22:36:34
阅读次数:
358
All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake?
...
分类:
其他好文 时间:
2014-09-06 20:03:53
阅读次数:
254
Word Break
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.
For example, given
s = "leetcode",...
分类:
其他好文 时间:
2014-09-06 18:46:33
阅读次数:
206
Description
Problem B
Cubes
You are given 12 rods of equal length. Each of them is colored in certain color. Your task is to determine in how many different ways one can construct a cube...
分类:
其他好文 时间:
2014-09-06 17:27:53
阅读次数:
253
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路:不断将相邻的链表两两合并,知道只剩一个链表为止。 1 class Solution { 2 pub...
分类:
其他好文 时间:
2014-09-06 14:51:13
阅读次数:
172
<?php
//快速排序
function?quickSork($arr)
{
$count?=?count($arr);
if($count?<?1)
{
return?$arr;
}
$one?=?$arr[0];
$left_array?=?$right_array??=?array();
for($i?=?1;?$i?...
分类:
Web程序 时间:
2014-09-06 12:32:23
阅读次数:
172
User Credentials In order to understand security in OS X, it is important to understand that there are two security models at work. One of these is th...
分类:
其他好文 时间:
2014-09-06 10:54:23
阅读次数:
365
Cannot complete the install because one or more required items could not be found. Software being installed: m2e - Maven Integration for Eclipse (inc....
分类:
系统相关 时间:
2014-09-06 00:59:32
阅读次数:
288
I:项目描述:利用Silverlight+WCF技术,模拟资源管理器(如图1)功能,通过地址栏输入本地文件夹路径,然后将解析出来的该目录下所有文件(夹)存储到数据库中,然后再加载到界面上显示出来;
II:涉及技术:Silverlight;WCF;Component One控件(TreeView和FlexGrid)
III:开发环境:Visual Studio2012;SQL Serve...
分类:
Web程序 时间:
2014-09-05 18:18:41
阅读次数:
434