d******l 发帖数: 98 | 1 建议楼主看看 CLRS那本书。。
其实DP 与 Divide-and-Conqur 很接近,就是没有重复的subproblem的,就属于Divide
-and-Conqur范围了,DC的subproblem是disjoint的,就是分类讨论的那种,,然后加
上 recursion。。 |
|
T***U 发帖数: 2265 | 2 书读傻了还是怎么的?
在社会上混几年,还看不清么?
美国的社会结构不就是
宗教+种族形成的利益团伙(也可以叫黑帮),抱团一致对外,利用结构的力量欺压剥削没
有形成黑帮的种族和个体
盎格鲁,犹太,老黑包括现在的老墨,印度人不都是走这条路么!
傻乐吧唧不懂这套的老中就是被压在最底层
争什么的道德
归根到底都是利益, 别人抱团整你压榨你根本不会讲道德
中国人吃亏在没有共同的信仰
再加上从小受TG的洗脑教育:什么个人努力,勤劳,公平
这些东西在社会上混只能让你做个优良的被压迫者,一辈子被压榨
一个人再优秀斗不过一个团体
能抱团的基础只有种族+共同的信仰(宗教)
还不明白么?
还有SB讲什么对老印讲道德
中国人要抱团,一直对外,把蛋糕先做大,内部怎么分都会爽
整天JJWW的内斗,对自己人挑这挑那
NB轰轰P用没有的
最后就是被divide和conqure灭掉的命
英国佬玩了几百年的divide和conqure简单老把戏,对中国人还就是有用
为什么? 中国人个个都只看到自己,自己要感觉吊啊
没用的,还不如低智商的老墨,老黑抱团后的力量大!
以后少来什么互相看不顺眼的装NB
种族+信仰+抱团
是我们 |
|
m***n 发帖数: 12188 | 3 to conqure a well-defended fortress, you need oceans of blood. |
|
h*****o 发帖数: 29 | 4 【 以下文字转载自 Military 讨论区 】
发信人: wildThing (东风起兮轰他娘, 安得巨浪兮吞扶桑), 信区: Military
标 题: Re: please support
发信站: BBS 未名空间站 (Sun Apr 20 01:15:35 2008), 转信
I would say:
"Can't you White trash dumbass get it through your pea-size brain that his
evilness had acted as bloody CIA agent for the past 50 years and had been
responsible for thousands of death?
The so-called "Yuan Dynasty" had conquered both China and Tibet but it had
also conqured much of the Europ and make your white trash ancestors slaves
too.
Th |
|
m*******e 发帖数: 321 | 5 争吵 only brings damage into your relationship.
You can not persuade him and he can not persuade you either.
Men simply won't listen, that is a plain fact.
So, you have to use wisdom or techniques to conqur a man.
Actually, next time he talks like this, if you could become soft first and
change the way you approach the problem, he may be inspired to change.
Just remember, don't complain and command him to change, it simply does not
work
that way. |
|
k***e 发帖数: 556 | 6 did you use divide and conqure and also use continuous sum ending at
a position which is min as a subroutine? |
|
g*******y 发帖数: 1930 | 7 Divide and conquer works? The "conqure" step takes O(n)? how?
我的想法是:
1. 转化为一个等价问题:
sum' = total sum - target_max_sum
问题转化为:在数组中找两段子数组,一段A数组从头开始,一段B数组在尾巴结束,这
两个数组之和>=sum',这两个数组的元素个数之和最小
2. sumA[i]= a[0] + ... + a[i],
sumB[i] = total sum - sumA[i-1] ...
3. define一个map mA, mB; 然后:
mA.insert(make_pair(sumA[i] ,i+1));
mB.insert(make_pair(sumB[i] ,N-i));
这一步要O(nlogn), 因为map是要对key排序的。
4. 把map中的value值改变为:
mA[key] = min{k+1}, for all sum[k] >= key,
这一步只要O(n),因为mA已经是按key排好序的;
现在这个mA中每一项的含义就是: |
|
|
w*******s 发帖数: 96 | 9 If the string is not the same length, my code will crash because of array
index out of boundary. Can you help find the bug?
//Refer Algorithm 4th, page 722
void exch(string &a, string &b)
{
string c = a;
a = b;
b = c;
}
int compare(int a, int b)
{
if (a
if (a==b) return 0;
if (a>b) return 1;
}
void ThreeWayQsort(vector &v, int low, int high, int d)
{
if (high<=low) return;
//3 way partition to handle duplicate
int lt = low;
int gt = h... 阅读全帖 |
|
|
d****n 发帖数: 397 | 11 divide conqur?和mergesort一样nlogn?
有0就输出true,如果数组不含0,
首先讲数组分为两半
判断两半是不是有true,有的话,return true,否则从中间开始,
i=floor[n/2],j=ceiling[n/2],如果i--,j++,直到i=0,j=n-1还没有sum是0的情况,
return false.
这样
T(n)=2T(n/2)+theta(n)=theta(nlogn); |
|
l*******g 发帖数: 82 | 12 第一题,suffixtree的话要看如何分词了。而且,suffixtree主要是搜索和搜索的精确
度有帮助,如果已经有neg词典的话就map就好了,然后先确定nag词,然后左右察看临
近词,比如is, not, yet, but之类的。这个感觉更像是machine learning sentiment
analysis。
第二题,那个数学的做法,那位再受累解释一下。没太明白。
第三题我觉得可以用conqure merge的做法,一般题目说有一个大数组,大文件,潜台
词就是最好提供一个可以parallel的处理方式,而且不要试图用用memory来存储太多东
西。
前些天面的EBay, onsite。 |
|
l*******g 发帖数: 82 | 13 第一题,suffixtree的话要看如何分词了。而且,suffixtree主要是搜索和搜索的精确
度有帮助,如果已经有neg词典的话就map就好了,然后先确定nag词,然后左右察看临
近词,比如is, not, yet, but之类的。这个感觉更像是machine learning sentiment
analysis。
第二题,那个数学的做法,那位再受累解释一下。没太明白。
第三题我觉得可以用conqure merge的做法,一般题目说有一个大数组,大文件,潜台
词就是最好提供一个可以parallel的处理方式,而且不要试图用用memory来存储太多东
西。
前些天面的EBay, onsite。 |
|
g*****9 发帖数: 621 | 14 many times you can not 算清楚, hehe
Even if you have super power in 算, you still need to conqur a lot of
other human factors ( greedy, win 100 mu etc), keep a simple mind that you
just want to win the game may help in a lot of situations |
|
r*********n 发帖数: 1166 | 15 没那么容易conqur yourself的, 我从记事起就开始受美女的蹂躏了, 。。。
率些 |
|
q**i 发帖数: 174 | 16 I don't understand the notations used here and "core
allocation"
so my comments may be off.
1) is there any cost to form the union, or to join the
coalition? or any benefits to get out the coalition?
it sounds like there is nothing to lose to join the
coalition, absent of any of the above.
2) this sounds like "divide and conqure": a few power
players
(those holding 2 left gloves) and a bunch of smaller players
(those holding single right gloves). In this particular
case,
the pressure is on the p |
|