上一页 1 2 3 4 5 6 7 ··· 20 下一页
摘要: Given a positive integer, your job is writing a program to determine whether it is a prime number or not.InputThere are several tests. Each test consi... 阅读全文
posted @ 2015-03-27 15:00 TCtower 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Description4x4 tic-tac-toe is played on a board with four rows (numbered 0 to 3 from top to bottom) and four columns (numbered 0 to 3 from left to rig... 阅读全文
posted @ 2015-03-22 19:28 TCtower 阅读(276) 评论(0) 推荐(0) 编辑
摘要: DescriptionYou all know the Dirichlet principle, the point of which is that if n boxes have no less than n + 1 items, that leads to the existence of a... 阅读全文
posted @ 2015-03-22 18:15 TCtower 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Description黑白棋(game)【问题描述】小A和小B又想到了一个新的游戏。这个游戏是在一个1*n的棋盘上进行的,棋盘上有k个棋子,一半是黑色,一半是白色。最左边是白色棋子,最右边是黑色棋子,相邻的棋子颜色不同。E小A可以移动白色棋子,小B可以移动黑色的棋子,他们每次操作可以移动1到d个棋子... 阅读全文
posted @ 2015-03-22 16:09 TCtower 阅读(511) 评论(2) 推荐(0) 编辑
摘要: Problem DescriptionIn ACM_DIY, there is one master called “Lost”. As we know he is a “-2Dai”, which means he has a lot of money.Well, Lost use Ipad an... 阅读全文
posted @ 2015-03-20 16:43 TCtower 阅读(369) 评论(0) 推荐(0) 编辑
摘要: DescriptionLittle Y finds there is a very interesting formula in mathematics:XY mod Z = KGiven X, Y, Z, we all know how to figure out K fast. However,... 阅读全文
posted @ 2015-03-20 10:04 TCtower 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThe picture indicates a tree, every node has 2 children.The depth of the nodes whose color is blue is 3; the depth of the node whos... 阅读全文
posted @ 2015-03-20 08:27 TCtower 阅读(522) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 唐代杜荀鹤 3 《小松》 4 自小刺头深草里,而今渐觉出蓬蒿。 5 时人不识凌云木,直待凌云始道高。 6 */ 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13... 阅读全文
posted @ 2015-03-18 20:01 TCtower 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1 /* 2 唐代李白 3 《江夏别宋之悌》 4 楚水清若空,遥将碧海通。人分千里外,兴在一杯中。 5 谷鸟吟晴日,江猿啸晚风。平生不下泪,于此泣无穷. 6 */ 7 #include 8 #include 9 #include 10 #include 11 #include 12 #incl... 阅读全文
posted @ 2015-03-18 17:29 TCtower 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Description这天,SJY显得无聊。在家自己玩。在一个棋盘上,有N个黑色棋子。他每次要么放到棋盘上一个黑色棋子,要么放上一个白色棋子,如果是白色棋子,他会找出距离这个白色棋子最近的黑色棋子。此处的距离是 曼哈顿距离 即(|x1-x2|+|y1-y2|) 。现在给出N 8 #include ... 阅读全文
posted @ 2015-03-18 09:23 TCtower 阅读(280) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 20 下一页