• 大小: 1KB
    文件类型: .py
    金币: 1
    下载: 0 次
    发布日期: 2021-01-05
  • 语言: Python
  • 标签: python  

资源简介

图的着色 python代码

资源截图

代码片段和文件信息

#!/usr/bin/env python
# -*- coding: GB2312 -*-
# Last modified:

“““docstring
“““

__revision__ = ‘0.1‘

def isOK(gxk):
    for i in range(0k):
        if g[k][i] and x[k]==x[i]:
             return 0
    return 1

def printAnswer(xnsn):
    print “the %d answer:“ % sn
    for i in range(0n):
       print x[i]


def map_color(n m gx):
    cnt=0
    for i in range(0m):
        k=1
        x[0]=i
        x[k]=0
        while k>0:
            while k                x[k]=x[k]+1
            

评论

共有 条评论