博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
The Havel-Hakimi Algorithm
阅读量:4646 次
发布时间:2019-06-09

本文共 350 字,大约阅读时间需要 1 分钟。

1.If any di>=n then fail

2.If there is an odd number of odd degrees then fail

3.If there is a di<0 then fail

4.If all di=0 then report success

5.Reorder S into non-increasing order

6.Let k=d1

7.Remove d1 from S

8.Subtract 1 from the first k terms remaining of the new sequence

9.Go to step 3 above

转载于:https://www.cnblogs.com/HaibaraAi/p/3477747.html

你可能感兴趣的文章
BZOJ 1613: [Usaco2007 Jan]Running贝茜的晨练计划
查看>>
ubuntu 重启命令,ubuntu 重启网卡方法
查看>>
Linux的学习:
查看>>
JavaScript中的原型继承原理
查看>>
Python logger模块
查看>>
jquery控制css的display(控制元素的显示与隐藏)
查看>>
关于python做人工智能的一个网页(很牛逼)
查看>>
判断控件的CGRect是否重合,获取控件的最大XY值
查看>>
POJ-1128 Frame Stacking
查看>>
浏览器调试淘宝首页看到有趣的招聘信息
查看>>
ASP.NET Identity “角色-权限”管理 4
查看>>
[转][译]ASP.NET MVC 4 移动特性
查看>>
SOC CPU
查看>>
get_result --perl
查看>>
163镜像地址
查看>>
ehcache memcache redis 三大缓存男高音
查看>>
eclipse 快捷键Open Implementation 直接退出
查看>>
minix中管道文件和设备文件的读写
查看>>
JAXB - Annotations, Annotations for Enums: XmlEnum, XmlEnumValue
查看>>
context 插图
查看>>