s*e
2 楼
【 以下文字转载自 Chicago 讨论区 】
发信人: WhoIam (Horse), 信区: Chicago
标 题: Re: Google.cn没有了
发信站: BBS 未名空间站 (Mon Mar 22 15:07:23 2010, 美东)
对,没了中国,地球照样转
发信人: WhoIam (Horse), 信区: Chicago
标 题: Re: Google.cn没有了
发信站: BBS 未名空间站 (Mon Mar 22 15:07:23 2010, 美东)
对,没了中国,地球照样转
p*c
3 楼
thanks
g*n
9 楼
i heard google move out the engine, but will keep maps, dictionary etc in g.
cn.... so what is the result?
cn.... so what is the result?
B*t
12 楼
find the longest subsequence that does not overlap with itself in
original array
这是什么意思?怎么find?O(nlogn)的方法不能直接拿过来用。二分的时候你要维护一
个数列的值,但是你怎么知道哪些需要更新,哪些不要?而且队列组成了一个环,二分被
更新掉的数据在后边可能会用到,你怎么把它恢复?
and of the
itself in original array O(nlogn) with binary search...So, totaly
time is O(nlogn)...
【在 x***y 的大作中提到】
: put one copy of the array after the other, and use O(nlogn) LIS and of the
: result, find the longest subsequence that does not overlap with itself in original array O(nlogn) with binary search...So, totaly time is O(nlogn)...
original array
这是什么意思?怎么find?O(nlogn)的方法不能直接拿过来用。二分的时候你要维护一
个数列的值,但是你怎么知道哪些需要更新,哪些不要?而且队列组成了一个环,二分被
更新掉的数据在后边可能会用到,你怎么把它恢复?
and of the
itself in original array O(nlogn) with binary search...So, totaly
time is O(nlogn)...
【在 x***y 的大作中提到】
: put one copy of the array after the other, and use O(nlogn) LIS and of the
: result, find the longest subsequence that does not overlap with itself in original array O(nlogn) with binary search...So, totaly time is O(nlogn)...
x*y
21 楼
It means that if we put 2 arrays together, the region that the LIS in may
overlap with itself. E.g if the array is 5 1 6 2 7 3 8 4, we can get
LIS is 8, but actually it should be 5.....So, after finding the LIS of the 2
combined arrays, we need the longest part of it that can exist in a
circular array. The way to do this is arrange the indices of the LIS
sequence, like above, 1 3 5 7 0 2 4 6, and use O(n) to find the first
nonincreasing index (0 here) and use binary search to find the corre
【在 B*****t 的大作中提到】
: find the longest subsequence that does not overlap with itself in
: original array
: 这是什么意思?怎么find?O(nlogn)的方法不能直接拿过来用。二分的时候你要维护一
: 个数列的值,但是你怎么知道哪些需要更新,哪些不要?而且队列组成了一个环,二分被
: 更新掉的数据在后边可能会用到,你怎么把它恢复?
:
: and of the
: itself in original array O(nlogn) with binary search...So, totaly
: time is O(nlogn)...
overlap with itself. E.g if the array is 5 1 6 2 7 3 8 4, we can get
LIS is 8, but actually it should be 5.....So, after finding the LIS of the 2
combined arrays, we need the longest part of it that can exist in a
circular array. The way to do this is arrange the indices of the LIS
sequence, like above, 1 3 5 7 0 2 4 6, and use O(n) to find the first
nonincreasing index (0 here) and use binary search to find the corre
【在 B*****t 的大作中提到】
: find the longest subsequence that does not overlap with itself in
: original array
: 这是什么意思?怎么find?O(nlogn)的方法不能直接拿过来用。二分的时候你要维护一
: 个数列的值,但是你怎么知道哪些需要更新,哪些不要?而且队列组成了一个环,二分被
: 更新掉的数据在后边可能会用到,你怎么把它恢复?
:
: and of the
: itself in original array O(nlogn) with binary search...So, totaly
: time is O(nlogn)...
c*l
22 楼
interesting, mark
B*t
23 楼
thanks a lot for your comment!
but there are still 2 things not clear to me.
1. how can you prove that the LIS in the circular array is a
subset of the LIS in the doubled array, or the length of LIS in
the circular array is equal to the length of some sub-array of
the LIS in the doubled array, such that the sub-array is a legal
LIS in the circular array?
2. In the extreme case, there are might be multiple equal length
LIS in the doubled array, which might approach O(n), and the
second step in yo
【在 x***y 的大作中提到】
: It means that if we put 2 arrays together, the region that the LIS in may
: overlap with itself. E.g if the array is 5 1 6 2 7 3 8 4, we can get
: LIS is 8, but actually it should be 5.....So, after finding the LIS of the 2
: combined arrays, we need the longest part of it that can exist in a
: circular array. The way to do this is arrange the indices of the LIS
: sequence, like above, 1 3 5 7 0 2 4 6, and use O(n) to find the first
: nonincreasing index (0 here) and use binary search to find the corre
but there are still 2 things not clear to me.
1. how can you prove that the LIS in the circular array is a
subset of the LIS in the doubled array, or the length of LIS in
the circular array is equal to the length of some sub-array of
the LIS in the doubled array, such that the sub-array is a legal
LIS in the circular array?
2. In the extreme case, there are might be multiple equal length
LIS in the doubled array, which might approach O(n), and the
second step in yo
【在 x***y 的大作中提到】
: It means that if we put 2 arrays together, the region that the LIS in may
: overlap with itself. E.g if the array is 5 1 6 2 7 3 8 4, we can get
: LIS is 8, but actually it should be 5.....So, after finding the LIS of the 2
: combined arrays, we need the longest part of it that can exist in a
: circular array. The way to do this is arrange the indices of the LIS
: sequence, like above, 1 3 5 7 0 2 4 6, and use O(n) to find the first
: nonincreasing index (0 here) and use binary search to find the corre
s*s
30 楼
我的土方法:
假设从一个点开始找最长递增序列到 和这个点前面的点。一个完整的树列。
再从中间点开始,找最长递增序列 到和中间点前面的点。
哪个最长递增序列长,就选哪个,
假设从一个点开始找最长递增序列到 和这个点前面的点。一个完整的树列。
再从中间点开始,找最长递增序列 到和中间点前面的点。
哪个最长递增序列长,就选哪个,
r*o
32 楼
我有个想法不知道对不对,
假定有个数组是
7,2,-1,3,0,4,-2,6,-2,0,-1,1
我们先找到它的最长递增子序列是2,3,4,6, 包含这个子序列的子数组是2,-1,3,0,4,-2
,6
不属于这个子数组的其他元素是7和-2,0,-1,1
然后我们考虑两种情形,
一种是把这些元素加到子数组左边,即 -2,0,-1,1,7,2,-1,3,0,4,-2,6
另一种是把这些元素加到子数组右边,即2,-1,3,0,4,-2,6,-2,0,-1,1,7
然后找这两个新数组的最长递增子序列,取最长的那个作答案。这里是-2,-1,1,2,3,4,
6.
感觉这个方案不一定对,而且可能你也想过这个方法了。如果不对的话,能否给出反例?
分被
【在 B*****t 的大作中提到】
: find the longest subsequence that does not overlap with itself in
: original array
: 这是什么意思?怎么find?O(nlogn)的方法不能直接拿过来用。二分的时候你要维护一
: 个数列的值,但是你怎么知道哪些需要更新,哪些不要?而且队列组成了一个环,二分被
: 更新掉的数据在后边可能会用到,你怎么把它恢复?
:
: and of the
: itself in original array O(nlogn) with binary search...So, totaly
: time is O(nlogn)...
假定有个数组是
7,2,-1,3,0,4,-2,6,-2,0,-1,1
我们先找到它的最长递增子序列是2,3,4,6, 包含这个子序列的子数组是2,-1,3,0,4,-2
,6
不属于这个子数组的其他元素是7和-2,0,-1,1
然后我们考虑两种情形,
一种是把这些元素加到子数组左边,即 -2,0,-1,1,7,2,-1,3,0,4,-2,6
另一种是把这些元素加到子数组右边,即2,-1,3,0,4,-2,6,-2,0,-1,1,7
然后找这两个新数组的最长递增子序列,取最长的那个作答案。这里是-2,-1,1,2,3,4,
6.
感觉这个方案不一定对,而且可能你也想过这个方法了。如果不对的话,能否给出反例?
分被
【在 B*****t 的大作中提到】
: find the longest subsequence that does not overlap with itself in
: original array
: 这是什么意思?怎么find?O(nlogn)的方法不能直接拿过来用。二分的时候你要维护一
: 个数列的值,但是你怎么知道哪些需要更新,哪些不要?而且队列组成了一个环,二分被
: 更新掉的数据在后边可能会用到,你怎么把它恢复?
:
: and of the
: itself in original array O(nlogn) with binary search...So, totaly
: time is O(nlogn)...
r*o
33 楼
有没有谁评价一下我的想法对不对?
欢迎拍砖。
-2
4,
【在 r****o 的大作中提到】
: 我有个想法不知道对不对,
: 假定有个数组是
: 7,2,-1,3,0,4,-2,6,-2,0,-1,1
: 我们先找到它的最长递增子序列是2,3,4,6, 包含这个子序列的子数组是2,-1,3,0,4,-2
: ,6
: 不属于这个子数组的其他元素是7和-2,0,-1,1
: 然后我们考虑两种情形,
: 一种是把这些元素加到子数组左边,即 -2,0,-1,1,7,2,-1,3,0,4,-2,6
: 另一种是把这些元素加到子数组右边,即2,-1,3,0,4,-2,6,-2,0,-1,1,7
: 然后找这两个新数组的最长递增子序列,取最长的那个作答案。这里是-2,-1,1,2,3,4,
欢迎拍砖。
-2
4,
【在 r****o 的大作中提到】
: 我有个想法不知道对不对,
: 假定有个数组是
: 7,2,-1,3,0,4,-2,6,-2,0,-1,1
: 我们先找到它的最长递增子序列是2,3,4,6, 包含这个子序列的子数组是2,-1,3,0,4,-2
: ,6
: 不属于这个子数组的其他元素是7和-2,0,-1,1
: 然后我们考虑两种情形,
: 一种是把这些元素加到子数组左边,即 -2,0,-1,1,7,2,-1,3,0,4,-2,6
: 另一种是把这些元素加到子数组右边,即2,-1,3,0,4,-2,6,-2,0,-1,1,7
: 然后找这两个新数组的最长递增子序列,取最长的那个作答案。这里是-2,-1,1,2,3,4,
a*9
34 楼
如果我理解的对的话,反例:
1,40,50,2,1, 3, 4, 5, 2, 3, 4
最长是1,2,3,4,5;
包含它的子数组是1,40,50,2,1,3,4,5
剩下的2,3,4加左加右都不能算得最长环子序列:1,2,3,4,40,50
-2
4,
【在 r****o 的大作中提到】
: 我有个想法不知道对不对,
: 假定有个数组是
: 7,2,-1,3,0,4,-2,6,-2,0,-1,1
: 我们先找到它的最长递增子序列是2,3,4,6, 包含这个子序列的子数组是2,-1,3,0,4,-2
: ,6
: 不属于这个子数组的其他元素是7和-2,0,-1,1
: 然后我们考虑两种情形,
: 一种是把这些元素加到子数组左边,即 -2,0,-1,1,7,2,-1,3,0,4,-2,6
: 另一种是把这些元素加到子数组右边,即2,-1,3,0,4,-2,6,-2,0,-1,1,7
: 然后找这两个新数组的最长递增子序列,取最长的那个作答案。这里是-2,-1,1,2,3,4,
1,40,50,2,1, 3, 4, 5, 2, 3, 4
最长是1,2,3,4,5;
包含它的子数组是1,40,50,2,1,3,4,5
剩下的2,3,4加左加右都不能算得最长环子序列:1,2,3,4,40,50
-2
4,
【在 r****o 的大作中提到】
: 我有个想法不知道对不对,
: 假定有个数组是
: 7,2,-1,3,0,4,-2,6,-2,0,-1,1
: 我们先找到它的最长递增子序列是2,3,4,6, 包含这个子序列的子数组是2,-1,3,0,4,-2
: ,6
: 不属于这个子数组的其他元素是7和-2,0,-1,1
: 然后我们考虑两种情形,
: 一种是把这些元素加到子数组左边,即 -2,0,-1,1,7,2,-1,3,0,4,-2,6
: 另一种是把这些元素加到子数组右边,即2,-1,3,0,4,-2,6,-2,0,-1,1,7
: 然后找这两个新数组的最长递增子序列,取最长的那个作答案。这里是-2,-1,1,2,3,4,
d*n
37 楼
Since it's a circular sequence, we want to find the optimal start point in
this sequence, so that the LIS exists in it. we have two ways to solve it.
1. Start at arbitary element and form a sequence, repeat this sequence and
find the LIS from the new sequence of size 2N. of course, we can stop early
if a LIS with length N is find(if all the elements are the same in the
sequence). the complexity will be O(2N*Log(2N))
2. Start at arbitary element and form a sequence, find all the ending
eleme
【在 B*****t 的大作中提到】
: 收尾相接的序列有什么好的算法求最长递增子序列的长度?
this sequence, so that the LIS exists in it. we have two ways to solve it.
1. Start at arbitary element and form a sequence, repeat this sequence and
find the LIS from the new sequence of size 2N. of course, we can stop early
if a LIS with length N is find(if all the elements are the same in the
sequence). the complexity will be O(2N*Log(2N))
2. Start at arbitary element and form a sequence, find all the ending
eleme
【在 B*****t 的大作中提到】
: 收尾相接的序列有什么好的算法求最长递增子序列的长度?
s*t
38 楼
如果是non decreasing的话这个解法的正确性似乎有问题?
如果s=[1,0]
在s2=[1,0,1,0]中,1,1是一个子序列,但是不合法
还是我理解的部队?
in
and
early
.
【在 d****n 的大作中提到】
: Since it's a circular sequence, we want to find the optimal start point in
: this sequence, so that the LIS exists in it. we have two ways to solve it.
: 1. Start at arbitary element and form a sequence, repeat this sequence and
: find the LIS from the new sequence of size 2N. of course, we can stop early
: if a LIS with length N is find(if all the elements are the same in the
: sequence). the complexity will be O(2N*Log(2N))
: 2. Start at arbitary element and form a sequence, find all the ending
: eleme
如果s=[1,0]
在s2=[1,0,1,0]中,1,1是一个子序列,但是不合法
还是我理解的部队?
in
and
early
.
【在 d****n 的大作中提到】
: Since it's a circular sequence, we want to find the optimal start point in
: this sequence, so that the LIS exists in it. we have two ways to solve it.
: 1. Start at arbitary element and form a sequence, repeat this sequence and
: find the LIS from the new sequence of size 2N. of course, we can stop early
: if a LIS with length N is find(if all the elements are the same in the
: sequence). the complexity will be O(2N*Log(2N))
: 2. Start at arbitary element and form a sequence, find all the ending
: eleme
相关阅读
Galaxy note 比 streak 5 还轻啊TP 文件名中文乱码 Kalemsoft.ksmplayerHP 不会再来个 TP fire sale 吧?nokia新机的性能这么杯具啊还有人出TP吗这俩Dell Latitude E6420你会选哪个?还是都不选? (转载)TP 刷 CM7 了上哪儿找 gapps 包?tp还未开刷cm7便挂掉升级OS5报3194错touchpad上面有什么类似pp live qqlive的软件吗kalemsoft player过期了GPS when there is no network$180 想买一个 16GB TOUCHPAD,有人 卖不? (转载)大家给参谋参谋手机iPhone上面如何用google voice?来看微软的科幻片安装android market的那个指导看不懂,求助TP升级3.04之后开始不稳定,莫名其妙重启诺基亚WP智能机被指定价高昂 缺乏竞争力苹果的新专利,带式天线专利获批!3G本位列其中