Marriage is Stable Problem Description Albert, Brad, Chuck are happy bachelors who are in love with Laura, Marcy, Nancy. They all have three choices. ...
分类:
其他好文 时间:
2017-02-20 22:27:02
阅读次数:
217
classNode(object):
__slots__=[
‘data‘,‘child‘,‘left‘,‘right‘,
‘degree‘,‘parent‘,‘childCut‘,
]
def__init__(self,data):
self.data=data
self.child=None
self.left=None
self.right=None
self.degree=0
self.parent=None
self.childCut=False
def__str__(self):
retur..
分类:
编程语言 时间:
2017-02-17 15:57:09
阅读次数:
191
Wildleopard had fallen in love with his girlfriend for 20 years. He wanted to end the long match for their love and get married this year. He bought a ...
分类:
其他好文 时间:
2017-02-16 17:39:45
阅读次数:
338
classNode(object):
def__init__(self,data):
self.data=data
self.child=None
self.left=None
self.right=None
self.degree=0
def__str__(self):
returnstr(self.data)
__repr__=__str__
classBinomialHeap(object):
MAX_DEGREE=20
def__init__(self):
self.root=None
de..
分类:
编程语言 时间:
2017-02-16 11:56:58
阅读次数:
221
Life is a flower, and love is the honey of the flower. 人生是花儿,而爱情就是花的蜜。 My life is not as beautiful and sweet as a blossoming flower. So be it. Keep pa ...
分类:
其他好文 时间:
2017-02-15 19:05:53
阅读次数:
224
Luck and Love Problem Description 世界上上最远的距离不是相隔天涯海角而是我在你面前可你却不知道我爱你 ―― 张小娴前段日子,枫冰叶子给Wiskey做了个征婚启事,聘礼达到500万哦,天哪,可是天文数字了啊,不知多少MM蜂拥而至,顿时万人空巷,连扫地的大妈都来凑热闹来 ...
分类:
其他好文 时间:
2017-02-14 23:55:22
阅读次数:
460
print('\n'.join([''.join([('Love'[(x-y) % len('Love')] if ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 <= 0 else ' ') for x in range(-30, 30)]... ...
分类:
编程语言 时间:
2017-02-10 18:21:30
阅读次数:
766
defadjust(a,root,n):
k=a[root-1]
c=root*2
whilec<=n:
ifc+1<=nanda[c]>a[c-1]:
c+=1
ifa[c-1]<=k:
break
a[c/2-1]=a[c-1]
c*=2
a[c/2-1]=k
defheapSort(a):
n=len(a)
foriinxrange(n/2,0,-1):
adjust(a,i,n)
foriinxrange(n-1,0,-1):
a[0],a[i]=a[i],a[0..
分类:
编程语言 时间:
2017-02-10 10:50:31
阅读次数:
173
JZPGYZ - Sevenk Love Oimaster Oimaster and sevenk love each other. But recently,sevenk heard that a girl named ChuYuXun was dating with oimaster.As a ...
分类:
其他好文 时间:
2017-02-09 19:07:57
阅读次数:
190
defpartition(a,i,j):
k=-1
whileTrue:
whilek*(a[i]-a[j])>=0:
ifi==j:
returni
j+=k
a[i],a[j]=a[j],a[i]
i,j,k=j,i-k,-k
defqsort(a,i,j):
ifi<j:
k=partition(a,i,j)
qsort(a,i,k-1)
qsort(a,k+1,j)
defquickSort(a):
qsort(a,0,len(a)-1)
if__name__==‘__main__‘..
分类:
编程语言 时间:
2017-02-09 16:41:35
阅读次数:
157