上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 给你一个n*m的方格图表示一个博物馆的分布图.每个方格上用'*'表示墙,用'.'表示空位.每一个空格和相邻的墙之间都有一幅画.(相邻指的是上下左右相邻).你可以从一个空格的位置走到相邻的空格位置.现在你给你若干个(xi,yi)形式的询问,表示你现在在(xi,yi)这个位置(保证为空位)出发,问你从这 阅读全文
posted @ 2019-07-23 20:32 木子川 阅读(239) 评论(0) 推荐(0)
摘要: 幻方是一种很神奇的 N*N 矩阵:它由数字 1,2,3,.....N x N 构成,且每行、每列及两条对角线上的数字之和都相同。当 N 为奇数时,我们可以通过下方法构建一个幻方:首先将 1 写在第一行的中间。之后,按如下方式从小到大依次填写每个数 K (K=2,3,...,N x N) :1.若 ( 阅读全文
posted @ 2019-07-22 16:55 木子川 阅读(873) 评论(0) 推荐(0)
摘要: As you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There are n planes on Earth, number 阅读全文
posted @ 2019-07-21 21:05 木子川 阅读(243) 评论(0) 推荐(0)
摘要: Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer power 阅读全文
posted @ 2019-07-19 21:53 木子川 阅读(208) 评论(0) 推荐(0)
摘要: The cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling- 阅读全文
posted @ 2019-07-19 18:36 木子川 阅读(109) 评论(0) 推荐(0)
摘要: Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea 阅读全文
posted @ 2019-07-19 18:07 木子川 阅读(222) 评论(0) 推荐(0)
摘要: Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the clus 阅读全文
posted @ 2019-07-18 20:15 木子川 阅读(261) 评论(0) 推荐(0)
摘要: Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the 阅读全文
posted @ 2019-07-18 19:38 木子川 阅读(169) 评论(0) 推荐(0)
摘要: FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line 阅读全文
posted @ 2019-07-18 11:01 木子川 阅读(157) 评论(0) 推荐(0)
摘要: The cows play the child's game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows create a 5 阅读全文
posted @ 2019-07-17 10:15 木子川 阅读(212) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 下一页