摘要: lightoj 1010 Knights in Chessboard链接:http://lightoj.com/volume_showproblem.php?problem=1010题意:国际象棋规则,在 m*n 的格子放某一棋子,棋子可以沿着它的8个方位直走,问盘子可以放多少个这样的棋子而使任意两个不发生冲突。思路:数学水题,找下算出几组,找下规律就出来了。值得注意的是有特判。代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 #defi... 阅读全文
posted @ 2013-08-09 17:10 妮king狼 阅读(363) 评论(0) 推荐(0)