欢迎访问我的个人网站==》 jiashubing.cn
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4712题目大意:任意两个数按位异或后二进制中含1的个数被称为海明距离,给定n个数,求出任意其中两个最小的海明数,输入是16进制。Sample Input2 2 12345 54321 4 12345 6789A BCDEF 0137FSample Output67分析:用随机数来模拟,加srand()函数,放置产生伪随机数。代码有2个。代码1: 1 # include 2 # include 3 # include 4 # include 5 # include 6 # define INF 0x3 阅读全文
posted @ 2013-09-18 07:19 贾树丙 阅读(536) 评论(0) 推荐(0) 编辑