深搜(dfs)
wzw-yali
这个作者很懒,什么都没留下…
展开
-
POJ 3172 Scales
Description Farmer John has a balance for weighing the cows. He also has a set of N (1 <= N <= 1000) weights with known masses (all of which fit in 31 bits) for use on one side of the balance. He p原创 2016-08-10 19:04:41 · 369 阅读 · 0 评论 -
POJ 1321 棋盘问题
Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子原创 2016-08-10 17:25:59 · 244 阅读 · 0 评论 -
POJ 2386 Lake Counting
Description Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains原创 2016-08-10 17:05:12 · 295 阅读 · 1 评论