2362专题

ZOJ 2362 Beloved Sons

题意: 将男孩和女孩配对  让月老开心度最高 (我把题目改得真洋气…) 思路: KM不解释… 代码: #include<cstdio>#include<cstring>#include<algorithm>#define oo 99999999#define M 410using namespace std;int t,n,m,ans;int link[M],

POJ 2362 Sqare【DFS】

http://poj.org/problem?id=2362POJ 2362 Sqare大意: 有n根木棒,长短不一,问能否使用所有的木棒摆出一个完整的正方形?分析:1.木棒的总长度整除42.DFS View Code #include < stdio.h > #include < string .h > const int N = 22 ; int sticks[N]; b