摘要:
Red and Black Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a bla 阅读全文
posted @ 2017-06-10 20:38
Zireael
阅读(160)
评论(0)
推荐(0)
摘要:
棋盘问题 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数 阅读全文
posted @ 2017-06-10 18:57
Zireael
阅读(271)
评论(0)
推荐(0)
摘要:
A. The Contest time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. The Contest time limit 阅读全文
posted @ 2017-06-10 14:16
Zireael
阅读(368)
评论(0)
推荐(0)
摘要:
判断一个数是否为回文数字,如1,2,3,121,1001,999都是回文数字,10,9898就不是回文数字。 解法:判断对称中心两端数字是否相同。 代码如下: bool isPalindrome(int x) { if (x<0 || (x != 0 && x % 10 == 0)) return 阅读全文
posted @ 2017-06-10 10:19
Zireael
阅读(251)
评论(0)
推荐(0)

浙公网安备 33010602011771号