xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 0.02M
    文件類型: .py
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-03-03
  • 語言: Python
  • 標(biāo)簽:

資源簡介

8數(shù)碼問題的python解決方案(代碼)

資源截圖

代碼片段和文件信息

from?queue?import?Queue
import?copy

‘‘‘設(shè)置數(shù)據(jù)結(jié)構(gòu)‘‘‘
class?Node:
????layout=[]
????depth=-1
????parent=None
????price=-1
????def?__init__(selfparentlayout=[]depth=-1price=-1):
????????self.layout=layout
????????self.depth=depth
????????self.parent=parent
????????self.price=price

????def?__repr__(self):
????????‘‘‘用來定義Node的字符輸出,print為輸出data‘‘‘
????????if?len(self.layout)==3:
????????????string=str(self.layout[0])+‘\n‘+str(self.layout[1])+‘\n‘+str(self.layout[2])
????????????return?string
????????else:
????????????return?str(self.layout)

????def?setLayout(selflayout):
????????self.layout=layout
????????return?layout

????def?setDeepth(selfdeepth):
????????self.depth=deepth
????????return?deepth

????def?setParent(selfparent):
????????self.parent=parent
????????return?parent

????def?setPrice(selfprice):
????????self.price=price
????????return?price

????def?hasParent(self):
????????return?self.parent?is?not?None

????def?toString(self):
?

評論

共有 條評論