package BitManipulation; //Question 461. Hamming Distance /* The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. Note: 0 ≤ x,…
题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=170 思路:统计每个节点的度,将度为1的节点消去所需要的最少的边即为答案. 代码: #include "stdio.h" //nyoj 170 网络的可靠性 #include "string.h" #define N 10005 int du[N]; int main() { int n; int i; int x,y; while(scanf("…