摘要: You are given n points on a line with their coordinates xi. Find the point x so the sum of distances to the given points is minimal. You are given n p 阅读全文
posted @ 2016-08-26 13:23 PrayG 阅读(328) 评论(0) 推荐(0) 编辑
摘要: Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are odd. Find an n × n matrix with di 阅读全文
posted @ 2016-08-26 13:17 PrayG 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://blog.csdn.net/fengchaokobe/article/details/7437767 目录 第一节 n阶幻方问题 第二节 由n阶幻方引发的思考正文第一节 n阶幻方问题 所谓n阶幻方问题,俗称“横竖斜相加和相等”(我们当时就是这么叫的)。用术语说就是:在一个N行N 阅读全文
posted @ 2016-08-26 13:01 PrayG 阅读(1048) 评论(0) 推荐(0) 编辑
摘要: output standard output The only king stands on the standard chess board. You are given his position in format "cd", where c is the column from 'a' to 阅读全文
posted @ 2016-08-26 12:01 PrayG 阅读(361) 评论(0) 推荐(0) 编辑