由买买提看人间百态

topics

全部话题 - 话题: combing
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
Y******Y
发帖数: 8753
1
小猫在我这儿。。。楼主妹妹亲自把它送了过来。浑身都是跳蚤,有肥又大的。我买了
洗碗液,flea comb,猫奶粉等等。。。
用flea comb梳了半天没疏下一只跳蚤,梳了很多跳蚤的排泄物,红色的一大片。 后来
没忍住还是洗了。。。洗了几十只跳蚤下来。过了3遍水,继续用flea comb,又刷下十
来只。还看到有在身上很活跃的,可是flea comb间隙太大疏不下来了。作罢。等过几
天那些跳蚤养肥了就可以疏下来了。汗。
立刻擦干了,然后保暖,小猫应该还好吧。我这里天气很暖和,还给做了个soybean bag
给它保暖。
给喂了点猫奶,吃的不多。。。擦他屁股也不拉翔拉尿。
约了兽医下午4点45看一下吧,然后学习一下擦屁股把翔把尿的技术
钢炮很好奇,绵绵很生气,狂揍钢炮来着。。
d******9
发帖数: 404
2
Below code may be not a perfect method, but it works.
Use the SASHELP Class data set to create a sample data set.
data A;
retain X Name Y Sex Z Age Height Weight;
set sashelp.class;
if ranuni(7546)<0.3 then X='Yes';
else if ranuni(7546)<0.5 then X='No';
else X=' ';
if ranuni(32681)<0.4 then Y='Yes';
else if ranuni(32681)<0.8 then Y='No';
else Y='***';
if ranuni(510)<0.6 then Z='Yes';
else if ranuni(33201)<0.8 then Z='No';
else Z='N/A';
run;
*******************************
Use array, find all the... 阅读全帖
s*****1
发帖数: 134
3
来自主题: JobHunting版 - 关于leetcode的combinationSum题
用java做了leetcode的combinationSum,其实就是DP,
我造了一个ArrayList> 的二维数组,假设数组名为 comb,
我从comb[0][0] 一直到 comb[input数组长度][target]开始DP,
我想算法没问题,但可能太耗空间了,一直是runtime error
我想请问版上是否有高人,给个这题的java版本,能够通过online的大小数据测试?谢
谢啦
c++版本我已经搜过了
c*****a
发帖数: 808
4
来自主题: JobHunting版 - Combination Sum II哪里做错了
大牛快来看看
Combination Sum II
Given a collection of candidate numbers (C) and a target number (T), find
all unique combinations in C where the candidate numbers sums to T.
Each number in C may only be used once in the combination.
Note:
All numbers (including target) will be positive integers.
Elements in a combination (a1, a2, … , ak) must be in non-descending
order. (ie, a1 ≤ a2 ≤ … ≤ ak).
The solution set must not contain duplicate combinations.
For example, given candidate set 10,1,2... 阅读全帖
x****8
发帖数: 127
5
来自主题: JobHunting版 - G 家电面题目, 欢迎讨论!
private static void printCombinations(String string) {
List positions = new ArrayList();
List values = new ArrayList();
for(int i = 0; i < string.length(); ++i){
if(string.charAt(i) == '?'){
positions.add(i);
values.add(-1);
}
}
int pos = 0;
while(pos >= 0){
int val = values.get(pos) + 1;
if(val == 2){
values.set(p... 阅读全帖
h*****7
发帖数: 60
6
不光是这道题,还有一些别的题python过不了。不才解法如下,之前写的一个不用查
list的版本也没过。
另外貌似像import sys; min = sys.maxint 这种都编译不过去?
class Solution:
# @return a list of lists of length 3, [[val1,val2,val3]]
def threeSum(self, num):
num.sort()
n = len(num)
res= []
if n<3:
return res
for i in range(n-2):
k = i + 1
j = n - 1
while k < j:
sum = num[i] + num[j] + num[k]
if sum < 0:
k += 1
... 阅读全帖
a******z
发帖数: 1464
7
来自主题: Parenting版 - Down by the bay
今天女儿唱着新学的Down by the bay, "Did you ever see a bear, combing his
hair?..."
我问,为什么是“combing his hair”而不是“combing his fur”
女儿说,因为fur不是一个rhyming word
我惊讶的半天没回过神。。。
d***a
发帖数: 13752
8
2. In how many ways can 18 be written as the sum of four distinct positive
integers? Note: 1 + 3 + 5 + 9 and 5 + 1 + 3 + 9 are counted as different
ways.
解法:
#include
#define N 18
int main()
{
int i, j, k, l;
int m = 0;
for (i = 1; i < N; i++)
for (j = 1; j < N; j++)
for (k = 1; k < N; k++)
for (l = 1; l < N; l++) {
if (i+j+k+l == N &&
i != j && i != k && i != l &&
j != k && j != l ... 阅读全帖
n********h
发帖数: 13135
9
来自主题: Parenting版 - 紧急求助,女儿头上长虱子了!
有ORGANIC的药水, 可以天天用. 还有我前面提到的电COMB, 不用洗头, 干的头发用那
个梳, 就可以杀死LICE. 但是还是需要用别的COMB把卵给梳下来. 买了那两种COMB, 头
发都不用沾水.
好象就算没有LICE, 用醋洗头对头发都很好. 如果学校有发现, 估计可以自己先洗一下
预防.
B*O
发帖数: 105
10
来自主题: Parenting版 - 关于head lice
美国人头发细,用美国的篦子(就是那些lice comb,号称能篦下来卵的)来篦中国人的
头发会拉坏头发。基本上是一下篦子就夹住头发,再拉头发就拔出来了。可以买那种叫
做detect comb的,不能篦下来卵的,但是可以篦下来成虫。
我家小孩曾经被传染上,我们没用药水就解决了。方法:1. 小孩头发短最好,可以肉
眼找。先用detect comb仔细搞几下,如果有基本能搞出来。然后可以肉眼找。仔细翻
找可以抓住一些。找到卵可以用指甲盖相互挤压死。啪的一声就死了。死了的卵也最好
用指甲捋下来,省的一会儿又找到同一个卵。我一次搞掉了100多个卵。2. 洗头。天天
洗,或者至少两天洗一次,用洗发水洗。刚孵化出来的幼虫附着力不强,这一个步骤是
对付它们的。如此坚持几个星期等所有的卵都孵化过,就行了。3. 家里其他人也要同
样对付。不仅小孩的妹妹被传上,妈妈头上也找到一个成虫,还好是刚过去的还没产卵
S*******y
发帖数: 575
11
来自主题: Immigration版 - 用combo回国
今天刚收到EAD,上面写着serve as AP,真的是comb卡。现在有H1b签证,如果返美用
这个comb卡,那不是肯定是用EAD卡入境,记得版上有人说过这样H1b会被终止,是不是
这样?
也有人说过不要show EAD卡,AP加签证入境,可以维持签证。但是,comb卡看来这点没
法实现啊。
到底该如何处理?
a********r
发帖数: 857
12
来自主题: Immigration版 - 急问关于140装订
自己file eb1a, 赶着寄,单位有机器可以搞成comb bind装订,就是这种
https://www.google.com/search?q=comb+binder&source=lnms&tbm=isch&sa=X&ved=
0ahUKEwjGlpOO39_VAhVm7IMKHRwHDG4Q_AUICygC&biw=1387&bih=834
看大家都是说用two hole punch加paper fastener,文具店没买到, 不知道有人用过
comb bind装订的吗
B******f
发帖数: 2489
13
楼上这么多人夸赞老爷子手艺,肯定是好的很。
不过俺打岔说一句,其实男同学理发,不是特别挑剔的话,完全可以DIY。
我以前去理发店理,过桥要收过桥费,停车位不好找,也要投币停车,算时间紧紧巴巴
。几年之后,心血来潮想剃光头,先是借了个推子,自己在家理光头,大约5min搞定,
后来自己买个推子理光头,自理了一年光景的光头。
然后有天又一次心血来潮,想:为什么不试试自己理平头呢?大不了失败了再剃光。于
是自己对着镜子,用推子自带的adapter comb控制长度,尝试理平头。结果第一次就成
功了。先用10mm或6mm的adapter把头顶和后脑大概理短,然后用3mm的短adapter comb
把两鬓和后脑边际理薄。中间反复换comb修改,第一次理好像花了一两个小时,之后还
不放心,还让朋友过来帮忙看下。不过我第一次理就觉得比理发店理的好,其他朋友同
事也都这么认为。后来理的熟练点后,可以20分钟搞定。我只有理光头和平头经验,所
以只能说这两种头型是绝对可以DIY的,如果要留长发的,可能还需要找别人理,或者
有人自己发展新的DIY发型种类。
快4年了,我在这边没再去过理发店。这次看mm老爸这
k**********s
发帖数: 6409
14
来自主题: Fishing版 - 我经常给新手推荐20康宝

现在不差钱了的华人不是你这种萎缩男的思路,买啥都是先来最贵的,号称一步到位,
比以后再升级省钱省事省心。比如相机,根本都不知道什么叫光圈,就直接上5000刀的
专业机,长、短专业级镜头一堆全配齐,一万多刀就这样轻易的、白白地送给日本鬼子
了。你还说不的。
20的comb质量差异很大,很多导环是不锈钢或chrome,轮子转起来摇摇晃晃的,但对于
新手来讲确实也无所谓。但是像daiwa那样的,导环是氧化铝的,竿子很轻才5oz(比手
机轻),金属轮子很精密,非新手使用也足够。如果钓不上鱼来,和这样的comb毛关系
没有。我的5块钱的zebco都用了10多年,我实在是看不出这个comb为啥不可以。
b*****e
发帖数: 14299
15
来自主题: GunsAndGears版 - mossberg 590A1 out of stock?

版上大侠能不能评点一下这几把枪?谢谢。感觉区别一个是18" barrel vs 20”
barrel,装弹量6 vs 9,有没有ghost ring?这几个到底有多大区别?比如装弹量6颗
和9颗实用起来差别大么?
这把是你的链接里的:比较便宜$429刀
http://www.budsgunshop.com/catalog/product_info.php/cPath/37_87
Action Pump
Gauge 12 GA
Barrel Length 18"
Capacity 5 + 1
Chamber 3"
Length 39.5"
Weight 6.75 lbs
Drop 1 1/2" @ Comb & 2 1/8" @ Heel
Stock Black Synthetic
Finish Parkerized
http://www.budsgunshop.com/catalog/product_info.php/products_id
这把贵一些,477刀。
Gauge: 12GA
Chamber: Fires 2 3... 阅读全帖
l**h
发帖数: 7994
16
来自主题: Fashion版 - 问个关于谭木匠木梳的问题
我现在英文和中文对不上号。请帮忙看看下面这个梳子是什么质地?
rosewood 和 Swartizia Wood 区别是什么?
Title : Comb-Rosewood Cut Teeth 7-9
Product Material: Swartizia Wood
http://tanswoodcomb.com/combs/precious-material-combs/rosewood-
d**********o
发帖数: 1321
17
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
最终版本的compiler测试结果
=================================================
Output of Building User Code
Explode the tar
c-.l
c-.y
scanType.h
makefile
symtab.h
symtab.cpp
emitCode.h
emitCode.cpp
20131214164956-huang-CS445-F13-A5.tar: POSIX tar archive (GNU)
Tests: directory
c-.l: lex description text
c-.y: lex description text
emitCode.cpp: ASCII C++ program text
emitCode.h: ... 阅读全帖
d**********o
发帖数: 1321
18
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
最终版本的compiler测试结果
=================================================
Output of Building User Code
Explode the tar
c-.l
c-.y
scanType.h
makefile
symtab.h
symtab.cpp
emitCode.h
emitCode.cpp
20131214164956-huang-CS445-F13-A5.tar: POSIX tar archive (GNU)
Tests: directory
c-.l: lex description text
c-.y: lex description text
emitCode.cpp: ASCII C++ program text
emitCode.h: ... 阅读全帖
s********k
发帖数: 212
19
来自主题: EnglishChat版 - Easy Hair Guide :-)
Easy Hair Guide

BEST LOOKS
Best Office Look: Sleek and shiny. How to: Use a comb to create a part when
hair is damp, pull back into a low ponytail and spritz with hairspray.
Best Beach Look: Carefree and wavy. How to: While hair is drying naturally,
don't comb it — just pull the top half back and secure with a barrette.
Going Natural: To create loose, natural-looking waves, start by washing and
conditioning your hair. The cleaner it is, the healthier it will look. Next,
comb out, a
T*******e
发帖数: 4928
20
来自主题: pets版 - 怎么杀跳蚤 (转载)
vacuum every day (seal or throw away the vacuum bag to prevent flea from
getting back to your home), wash all that can be washed, comb cat hair to
catch flea and put flea in water mixed dish detergent (they will die in a
minute).
Recommend a flea comb:
http://www.dog.com/item/safari-double-row-flea-comb/190341/
T*******e
发帖数: 4928
21
Get some double-row flea combs for cats and hepa bagged vacuum machine for
the floor. This following is the best flea comb.
http://www.dog.com/item/safari-double-row-flea-comb/190341/
我都已经说了多少遍。跟做广告似的。 我前前后后买了二三十个双齿的跳蚤梳子,每
次梳下跳蚤来就扔到洗碗液混的水里。跳蚤十几秒就死了。可以不用那么贵的跳蚤药。
就是梳毛要花时间。但是比上药健康。当然如果严重的话,也可以各种方法都用上。
p**o
发帖数: 3409
22
来自主题: Programming版 - 计算组合数C(m,n)
In [6]: from scipy import misc
In [7]: float(misc.comb(800, 200))
Out[7]: 7.725180424308654e+193
In [8]: misc.comb(80, 20, exact=True)
Out[8]: 3535316142212174320L
In [9]: misc.comb(800, 200, exact=True)
Out[9]:
77251804243102249900492680663173121937380428827121913983653641771247184259
511395708778940396868688593938893892876285454025018169910
351416052742960313511746489365778233208840410665960743057530800L
source:
https://github.com/scipy/scipy/blob/master/scipy/misc/common.py
p**o
发帖数: 3409
23
来自主题: Programming版 - 计算组合数C(m,n)
In [6]: from scipy import misc
In [7]: float(misc.comb(800, 200))
Out[7]: 7.725180424308654e+193
In [8]: misc.comb(80, 20, exact=True)
Out[8]: 3535316142212174320L
In [9]: misc.comb(800, 200, exact=True)
Out[9]:
77251804243102249900492680663173121937380428827121913983653641771247184259
511395708778940396868688593938893892876285454025018169910
351416052742960313511746489365778233208840410665960743057530800L
source:
https://github.com/scipy/scipy/blob/master/scipy/misc/common.py
b******n
发帖数: 4225
24
来自主题: Biology版 - 大量的蛋白如何上样?
要用comb,我是说用tape将几个梳齿连起来
如果还不明白我说的你就直接买好了
这张图里面有你想要的那种comb,仔细看
http://www.bio-rad.com/prd/en/US/adirect/biorad?ts=1&cmd=BRCatgProductDetail&vertical=LSR&catID=5cf78e19-7ed5-4373-a988-3e62456a488e
如果你们实验室有bio-rad的mini灌胶系统,应该也有这种comb的
翻一翻以前的盒子
w*******5
发帖数: 831
25
来自主题: Biology版 - 包子求文献
2个包子求来自同一个杂志的3篇文章,请将全文包括supporting materials发到
w**********[email protected],谢谢!
1. Ana Paula B. Moreira, Nei Pereira, Jr, and Fabiano L. Thompson
Usefulness of a real-time PCR platform for G+C content and DNA–DNA
hybridization estimations in vibrios
Int J Syst Evol Microbiol October 2011 61:2379-2383; published ahead of
print November 5, 2010, doi:10.1099/ijs.0.023606-0
2. Reclassification of Aurantimonas altamirensis (Jurado et al. 2006),
Aurantimonas ureilytica (Weon et al. 2007) and Aurantimonas ... 阅读全帖
o******e
发帖数: 284
26
来自主题: Chemistry版 - 2011 if chemistry
if>1
1 CHEM REV 40.197
2 NAT MATER 32.841
3 CHEM SOC REV 28.760
4 ACCOUNTS CHEM RES 21.640
5 NAT CHEM 20.524
6 ALDRICHIM ACTA 16.091
7 NANO TODAY 15.355
8 ANNU REV PHYS CHEM 14.130
9 ADV MATER 13.877
10 ANGEW CHEM INT EDIT 13.455
11 NANO LETT 13.198
12 COORDIN CHEM REV 12.110
13 SURF SCI REP 11.696
14 ACS NANO 10.774
15 MED RES REV 10.700
16 J PHOTOCH PHOTOBIO C 10.360
17 ADV FUNCT MATER 10.179
... 阅读全帖
w*******y
发帖数: 60932
27
Walmart has WAHL Chrome Pro Complete Haircutting Kit with Premium DuraChrome
Finish for 15$ with free shipping to home.
Linky : Link:
http://www.walmart.com/ip/WAHL-Chome-Pro-Complete-Haircutting-Kit-with-Premium-DuraChrome-Finish/14098216?dest=9999999997&sourceid=00766811993356654661&wmlspartner=aB8BeTfRgb8
WAHL Chrome Pro Complete Haircutting Kit (Model 79520-008) is the top of the
line kit with all the tools you need to deliver a cut that looks fresh from
the barber shop.
Pro-quality clipper ... 阅读全帖
m***n
发帖数: 12188
28
来自主题: History版 - 鲁迅和刘晓波都骂了汉字
遗憾的是,你的几个论据全是错的。另外,五四时期流行的几个关于汉字落后的论据,
其实也都是错误的。如果你坚持你的论点,你至少需要仔细思考一下你的论据。
1)英文其实不是言文一致的。英文本身不能完全显示发音,所以需要音标。比如comb,
bomb, tomb, combe, 你还是得背发音。某些语言的文字倒是可以完全表音,甚至重音
都基本确定。但並不見得比英语好。
你最多可以说英文对于发音的提示更多更好。但是一点差别就能让人听不懂。英语重音
很重要,重音位置不对,别人也很难听懂你,元音发音有错误反而对理解影响不大,这
是老印的英语能被理解的主要原因。而华人的英语元音一般发得更好,但是辅音发得不
好,重音位置错误。
实际上,不说读写,只说听说,中文的“容错性”比英文更好。也就是说你发音有小错
误,仍然能理解。比如很多方言味道和老外说的汉语,其实每个音调都是错的,但是仍
然能理解,对重音要求也不高。而英语的听说对发音和重音位置的要求更高。
2)为什么高级先进的语言读法和写法不能分离呢?
你这还是五四时期的老论调。最新的神经科学和语言学早就在质疑了。先不说英语本身
就是读音和写法分离的。即使不分... 阅读全帖
E*V
发帖数: 17544
29
来自主题: Military版 - read this carefully!
【 以下文字转载自 WorldNews 讨论区 】
发信人: EUV (奶特都是卖国贼), 信区: WorldNews
标 题: read this carefully!
发信站: BBS 未名空间站 (Sun May 29 00:08:46 2011, 美东)
http://www.nytimes.com/2011/05/29/us/29surveillance.html?_r=1&h
AUSTIN, Tex. A fat sheaf of F.B.I. reports meticulously details the
surveillance that counterterrorism agents directed at the one-story house in
East Austin. For at least three years, they traced the license plates of
cars parked out front, recorded the comings and goings of residents and
guests and, i... 阅读全帖
O**n
发帖数: 649
30
AUSTIN, Tex. — A fat sheaf of F.B.I. reports meticulously details the
surveillance that counterterrorism agents directed at the one-story house in
East Austin. For at least three years, they traced the license plates of
cars parked out front, recorded the comings and goings of residents and
guests and, in one case, speculated about a suspicious flat object spread
out across the driveway.
“The content could not be determined from the street,” an agent observing
from his car reported one day in 20... 阅读全帖
k********k
发帖数: 5617
31
http://sgcls.zhongwenlink.com/blog_read.asp?id=23&blogid=4890
第一家庭的第一女儿──《菲律宾总统阿罗约夫人传》
文/施雨
2009年10月30日,星期五
阿罗约夫人是菲律宾前总统迪奥斯达多•马卡帕加尔的女儿,1968年到华盛
顿乔治敦大学学习,与美国前总统比尔•克林顿是同班同学。回国后,她继续深
造,获得经济学博士学位。毕业后从事教学工作,后来成为一名助理教授。
1986年2月,马科斯下台后,阿罗约夫人开始从政生涯。2001年1月就任菲律宾第14
届总统,2004年大选获胜,连任总统,阿罗约夫人虽然外型娇小,办事却雷厉风行,无
论是在经济管理部门还是在政治舞台上都十分令人钦佩。在美国《福布斯》评选“世界
前100名女强人”中,她排名第九。
作者:[菲]尼克•华谨 中译者:[美]施雨 施迪夫 海潮摄影艺术出版社 出版
新纪元是马卡帕加尔总统如何命名他的时代(打趣说或许重新命名为新穷人),他
的格言是:简朴──对于上层的人来说这是另类,而对底下的人来说,是鞭策。马卡帕
加尔的话像刀锋一样锐利。... 阅读全帖
w********9
发帖数: 8613
32
来自主题: Military版 - 惊讶于德国人的英语能力
这是Shorter Oxford American English Dictionary第五版列出的与德语或者日耳曼语
相关的英语词根或词汇。
-at, suffix2. + -dom, suffix. + -ed, suffix1. + -ed, suffix2. + -en, suffix1
+ -en, suffix2 + -en, suffix5 + -en, suffix6 + -er, suffix1. + -er, suffix3
. + -er, suffix5. + -est, suffix1. + -est, suffix2. + -et, suffix2. + -eth,
suffix1. + -hood, suffix. + -ing, suffix1. + -ing, suffix3. + -ish, suffix1.
+ -kin, suffix. + -le, suffix1 + -le, suffix3 + -less, suffix. + -ling,
suffix1. + -ling, suffix2 + -ly, suffix1. + -ly, s... 阅读全帖
r*****1
发帖数: 3465
33
来自主题: Military版 - 曾母暗沙到底在哪里
蒙自礁 Menzies Reef
控湃暗沙 Combe Shoal
就说这两个吧,Menzies,Combe都是西方的姓。
谁说说蒙自,控湃是中文的啥意思?(或者海南人的方言),除了音译没别的解释。
恒礁 Ganges Reef
Ganges是恒河的意思,中文为啥叫恒礁?因为是意译。
翻译的就是翻译的,有啥不好意思承认的,用不用我把1935年和1947年内政部公布南海
诸岛新旧名称对照表和地图贴出来?
l****z
发帖数: 29846
34
Second body part found after human foot mailed to Conservative Party HQ
OTTAWA — Police found a human hand at the Ottawa Postal Terminal on Tuesday
night, hours after a bloody foot was delivered to the Conservative party’s
Ottawa headquarters just blocks from Parliament Hill.
Ottawa police were still trying to understand what they were dealing with,
even as detectives in Montreal combed through a crime scene where a torso
was found in a suitcase in that city’s Snowdon district.
Police discovered... 阅读全帖
E*V
发帖数: 17544
35
来自主题: WorldNews版 - read this carefully!
http://www.nytimes.com/2011/05/29/us/29surveillance.html?_r=1&h
AUSTIN, Tex. A fat sheaf of F.B.I. reports meticulously details the
surveillance that counterterrorism agents directed at the one-story house in
East Austin. For at least three years, they traced the license plates of
cars parked out front, recorded the comings and goings of residents and
guests and, in one case, speculated about a suspicious flat object spread
out across the driveway.
The content could not be determined from the st... 阅读全帖
s****a
发帖数: 195
36
什么都不要。给看下护照就可以
p**********r
发帖数: 195
37
谢谢回复。如果这情况,在返回美国入关的时候,出示EAD/AP,海关官员如何判断你的
EAD/AP卡是在你离境之前就寄到了你美国的地址?我听说485pending的时候,AP没寄到
之前不能出境,再让美国的朋友把后寄到的AP寄回中国的人用于返美。
s****a
发帖数: 195
38
不知道了,可能航空公司有记录,就跟电子i94一回事。
y**o
发帖数: 69
39
来自主题: HiFi版 - Projection TVs (6)
Glossary
2 Speaker Simulated Surround- By electronically manipulating the sound signal, the manufacturer is able to simulate the ambiance
of a surround sound experience with just two front speakers.
2 Tuner Picture-in-Picture- With two separate tuners built into the TV, you can tune in one station for your large picture and a
second station for your PIP picture. This makes it unnecessary to have a VCR connected to receive a second station.
3 Line Digital Comb Filter- This is the ultimate comb fi
c*********n
发帖数: 1057
40
来自主题: JobHunting版 - 一道小题
用recursive容易很多啊
void comb(int l,int r, char *result,int size){
//printf("%d, %d, %s\n",l,r,result);
if(l==0 && r==0){
printf("%s\n",result);
return;
}
if(l==r){
strcat(result,"(");
comb(l-1,r,result,size);
}
else if(l if(l>0 && r>0){
char *result1=calloc(size,1);
strcpy(result1,result);
strcat(r
s**9
发帖数: 207
41
来自主题: JobHunting版 - 这里聪明人多,来一道面试题
solution based on back tracking:
#include
using namespace std;
const int N=10;
const int M=10;
//sort a[N] first;
int a[N]={0,0, 2, 3, 4,5,5,8,9,10};
int level=0;
int order[N];
int sum=0;
void comb(int i){
order[level++]=a[i];
sum+=a[i];
if(sum>M){
for(int j=0;j cout< cout< }
if(level for(int j=i+1;j if(a[j]!=a[j-1])
comb(j);
}
}
sum-=a[i]
P********l
发帖数: 452
42
来自主题: JobHunting版 - 请教个题目
这是那个“数组里两个数和为给定值”问题的扩展版。
觉得枚举每个组合就挺好。比如,52张牌选三张的组合是
1, 1, 1
1, 1, 2
1, 1, 3
。。。
1, 1, 13
1, 2, 2
1, 2, 3
。。。
11, 13, 13
12, 12, 12
12, 12, 13
12, 13, 13
13, 13, 13
如果要选4张牌,使其和为28,就可以通过前三张算出第四张,然后检查是否符合要求。
代码:
http://code.google.com/p/sureinterview/source/browse/test/test1/CombinationTest.java#120
public void testNumComb2() {
// list all combinations of c(7,3)
int suit = 4;
int rank = 13;
int takeN = 3; //4-1=3。
int totalNum = 28;
List ... 阅读全帖
l*********y
发帖数: 142
43
来自主题: JobHunting版 - 找零钱的变体
Given n types of coin denominations of values, makes change for an amount of
money C with as few coins as possible. 找零钱是O(Cn);
今天看到一个print_all_combination 的 implementation, very straightforward,
那位大侠给分析一下复杂度, 这个应该不低于O(Cn)
int cent = 100; // how to make change for 1 dollar with unlimited
// quarter, dime, nickel and cent
int comb = 0; // how many combinations;
for (int i = 0; i <= cent/ 25; i++) {
int cent_q = cent - i * 25;
for (int j = 0; ... 阅读全帖
w********s
发帖数: 1570
44
来自主题: JobHunting版 - FB 面经
n取k,似乎很简单
#include
#include
#include
typedef std::vector > ResultVec;
ResultVec comb(int* array, int n, int k)
{
ResultVec v;
if (k == 1)
{
for (int i = 0; i < n; ++i)
{
std::vector e;
e.push_back(array[i]);
v.push_back(e);
}
return v;
}
for (int i = 0; i <= n - k; ++i)
{
int head = array[i];
ResultVec vec = comb(array + i + 1, n - i - 1, k - 1);
BOOST_FOREACH(std::vector ... 阅读全帖
s****x
发帖数: 4701
45
好吧,电池电池电池~~~~~~~
个人感觉比那个comb合算,我们也在那里纠结了半天是买99刀的compact还是买199刀的
comb(多一个impact和一个包,也只有两块电池)。
前者原价169,便宜了70
后者原价259,便宜了60
最后买了前面那个,多的impact貌似钻速更厉害,钻得力量更大。不过也感觉鸡肋了点
,请懂得人再来说说。
impact那个貌似没有单卖的,不知道为什么。
l*******c
发帖数: 110
46
1. 这个不难. 我家当初跟你的情况一模一样. 觉得microwave, range hood comb不给
力. 老中做饭油烟大. 如果抽油烟机是靠外墙的话,安装起来应该不难. 我们当时自己
把microwave, range hood comb拿下来. 让contractor帮我们换厨房的countertop的时
候顺便把我们自己买的抽油烟机装上. 只要你量好抽油烟机的尺寸,完全可以做.
2. 地板这个价格要看你买什么样的,而且builder给的这个4万3要cover多少sq ft. 通
常找builder做肯定贵, 这是肯定的. 在不知道你打算用具体什么样子的木板,很难确
定价格是否合理.
3. 这个不太清楚. 我们当时用builder给的credits. 我自己觉得这种事情找外面人做
不见得便宜. 人家要去给墙挖洞,接线,安装额外的switch.
4. 要看什么样的quartz. builder应该不允许你私自在没有close之前从外面找
contractor. 这种事情我觉得应该close以后搞. 我们当时去designer那里,builder只
提供granite. c... 阅读全帖
r********h
发帖数: 5638
47
来自主题: NextGeneration版 - 推荐个给宝宝洗头的东西吧。
same here, I use that too. my baby has craddel cap as well. Now he is
almost two months, it's getting better and there is only a little bit on
top part of his head where i don't want to touch it.
Wash the head everyday, use head to toe baby wash, massage the head, use
the comb that hospital gave to comb the hair, wash it all off. Few weeks
later, you should see the big difference.

,用大人的洗发
w**********2
发帖数: 332
48
来自主题: Parenting版 - 紧急求助,女儿头上长虱子了!
just google head lice home treatment. there are OTC shampoo, electronic comb
to detect live lice etc. you also have to vacuum floor, furniture, hot
wash everything that can go into washer, throw others into trash bag and tie
the strings (leave for 2 weeks before re-open). If I were you, I would
just cut her hair short so it is easy to comb through and detect lice/lice
eggs. A friend of mine ended up hiring a professional to check her daughter
's hair for a week until all is clear.
n********h
发帖数: 13135
49
来自主题: Parenting版 - 紧急求助,女儿头上长虱子了!
第一, 应该告诉学校. 我们不会一直让你呆在家里, 只要用杀LICE的洗发水处理过, 把
活的都杀了, 就可以来学校上学了. 你告诉学校, 学校会替你保密的. 学校会给家长发
信, 让家长检查自己的孩子是不是传上了. 发现早, 处理起来会容易很多. 我家孩子学
校给我发过好几次这样的信, 我们从来都不知道具体是哪个孩子长了. 这个你可以放心.
第二, 先去买杀LICE的洗发水, 药店就有. 如果有ORGANIC的, 可以买, 可能刺激比较
小.
第三, 所有孩子接触到的床上用品, STUFF ANIMAL之类, 要用热水洗, 高
温哄干. 不能洗的, 放进塑料袋,把口扎紧. 等孩子头上的LICE彻底消失之
后两个星期之后可以拿出来用.
第四,专门的洗发水只能杀活的, 不能去卵. 如果去卵,可以用这个COMB
http://www.amazon.com/Fairy-Tales-Terminator-Lice-Comb/dp/B002S
还有一种电COMB, 可以用微小的电流杀死LICE. 好处是不用洗头,
http://www.amazon.com/LiceGuard-Robi-Comb... 阅读全帖
l******o
发帖数: 1072
50
有人做过吗?不知道看不看oop?
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)