摘要: Generate a String Generate a String zscoder wants to generate an input file for some programming competition problem. His input is a string consisting 阅读全文
posted @ 2016-08-23 10:27 stort 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Magic Odd Square Magic Odd Square Find an n × n matrix with different numbers from 1 to n2, so the sum in each row, column and both main diagonals are 阅读全文
posted @ 2016-08-23 10:15 stort 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Optimal Point on a Line Optimal Point on a Line You are given n points on a line with their coordinates xi. Find the point x so the sum of distances t 阅读全文
posted @ 2016-08-23 10:09 stort 阅读(230) 评论(0) 推荐(0) 编辑
摘要: King Moves King Moves 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-23 10:04 stort 阅读(192) 评论(0) 推荐(0) 编辑