https://oj.leetcode.com/problems/container-with-most-water/Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai...
分类:
其他好文 时间:
2015-02-03 20:55:30
阅读次数:
132
uva 101 The Blocks Problem
Background
Many areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and...
分类:
其他好文 时间:
2015-02-03 19:38:53
阅读次数:
341
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 35502
Accepted: 15572
Description
A numeric sequence of ai is ordered if a1...
分类:
其他好文 时间:
2015-02-02 23:14:01
阅读次数:
274
斯坦福机器学习公开课---1. 机器学习简单介绍
1.1 介绍
机器学习流行原因---
1) 由人工智能AI发展来的一个领域
2) 是计算机需要开发的一项新的能力,涉及工业和基础学科中的很多内容。
应用学习算法,如设计自主机器人,计算生物学和其他被机器学习影响的领域。
1.2 机器学习应用
1) 数据挖掘
网站点击流数据、电子医疗记录、计算生物...
分类:
其他好文 时间:
2015-02-02 21:38:06
阅读次数:
1210
题意:给定n表示有n个格子,下面每个格子为O的概率是多少。对于一段连续 x 个O的价值就是 x^2 ;求获得的价值的期望是多少。
思路:n^2=n×(n-1)+n,设ai为第i段连续O的长度,∑ai^2 = ∑[ ai+ ai*(ai-1) ] = ∑ ai*(ai-1) + ∑ai = ∑ C(ai, 2)*2 + ∑ai,那么问题可以转
化为求长度大于1的连续段数*2+O的个数的总期望。 ...
分类:
其他好文 时间:
2015-02-02 14:12:38
阅读次数:
88
Description
A numeric sequence of ai is ordered if a1 a2 <
... aN. Let the subsequence of the given numeric sequence (a1, a2,
..., aN) be any sequence (ai1, ai2,
..., aiK), where 1 i1 i2 <
...
分类:
其他好文 时间:
2015-02-02 10:54:35
阅读次数:
145
//poj 3016 K-Monotonic//分析:与2005年集训队论文黄源河提到的题目类似,给定序列a,求一序列b,b不减,且sigma(abs(ai-bi))最小。//思路:去除左偏树(大根堆)一半的节点(向上取整),让左偏树的根节点上存放中位数;每个左偏树的根节点表示一个等值区间//在本题...
分类:
其他好文 时间:
2015-02-01 23:07:17
阅读次数:
299
康托展开 康托展开的公式是 X=an*(n-1)!+an-1*(n-2)!+...+ai*(i-1)!+...+a2*1!+a1*0! 其中,ai为当前未出现的元素中是排在第几个(从0开始)。 这个公式可能看着让人头大,最好举个例子来说明一下。例如,有一个数组 s = ["A", "B", "C.....
分类:
其他好文 时间:
2015-02-01 14:44:49
阅读次数:
213
题目链接:http://codeforces.com/problemset/problem/509/B题目意思:有 n 个piles,第 i 个 piles有 ai 个pebbles,用 k 种颜色去填充所有存在的pebbles,使得任意两个piles,用颜色c填充的pebbles数量之差 2 #....
分类:
其他好文 时间:
2015-02-01 14:41:48
阅读次数:
170
题意:给定一个长度为n的序列,m次询问,每次询问一个区间[l, r],求max(Ai xor Ai+1 xor Ai+2 ... xor Aj),其中lusing namespace std;typedef long long ll;const int M=8000005;struct node *...
分类:
其他好文 时间:
2015-02-01 13:28:48
阅读次数:
190