摘要: http://poj.org/problem?id=1321棋盘问题Time Limit:1000MSMemory Limit:10000KTotal Submissions:17792Accepted:8809Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 阅读全文
posted @ 2013-06-02 21:54 crazy_apple 阅读(197) 评论(0) 推荐(0) 编辑
摘要: http://acm.uestc.edu.cn/problem.php?pid=1874&cid=217Wally WorldTime Limit: 1000 ms Memory Limit: 65535 kB Solved: 26 Tried: 135 DescriptionTwo star-crossed lovers want to meet. The two lovers are standing at distinct points in the plane (but then again, aren't we all?). They can travel freel 阅读全文
posted @ 2013-06-02 14:44 crazy_apple 阅读(299) 评论(0) 推荐(0) 编辑