-
counting-sheep
前一段时间我有睡眠问题。我曾经躺在床上,盯着天花板,几个小时。后来有一天,我的外婆建议我试着数羊后,我已经上床睡觉。与往常一样,当我的奶奶暗示的东西,我决定尝试一下。唯一的问题是,有没有羊的时候,我就去睡觉各地进行计数。
创意,因为我,这是不会阻止我。我坐下来写,使得字符,其中#代表羊的网格,而计算机程序。草(或任何你喜欢的,只是没有羊)。为了使计算更有趣,我也决定要数绵羊,而不是单一的成群的牛羊。两只羊在同一个群,如果他们都有一个共同的一面(上,下,左或右)。另外,如果羊A是在同一羊群如羊B和羊B处于同一羊群如羊℃,然后羊A和C是在同一个群。
现在,我已经有了一个新的问题。虽然这些计数羊居然帮我睡着了,我觉得这是非常无聊的。为了解决这个问题,我决定我需要做的计数为我另一台计算机上的程序。然后,我就可以只启动这两个程序之前,我去睡觉,我会睡个好觉,直到没有任何干扰的早晨。我需要你给我写的这个程序。(A while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours and hours. Then one day my grandmother suggested I tried counting sheep after I d gone to bed. As always when my grandmother suggests things, I decided to try it out. The only problem was, there were no sheep around to be counted when I went to bed.
Creative as I am, that wasn t going to stop me. I sat down and wrote a computer program that made a grid of characters, where# represents a sheep, while . is grass (or whatever you like, just not sheep). To make the counting a little more interesting, I also decided I wanted to count flocks of sheep instead of single sheep. Two sheep are in the same flock if they share a common side (up, down, right or left). Also, if sheep A is in the same flock as sheep B, and sheep B is in the same flock as sheep C, then sheeps A and C are in the same flock.
Now, I ve got a new problem. Though counting these sheep actually helps me fall asleep, I find)
- 2014-11-20 16:33:12下载
- 积分:1
-
POS
说明: 风光混合储能的生命周期费用考虑包括蓄电池、超级电容器的生命周期费用,(Life cycle cost considerations for landscape hybrid energy storage include life cycle costs for batteries and supercapacitors.)
- 2019-05-01 13:09:14下载
- 积分:1
-
Looping
Looping statement in c++
- 2010-03-09 10:09:13下载
- 积分:1
-
C1-
应用于地震勘探领域的资料处理,第一代相干算法处理。(Used in seismic exploration in the field of data processing, the first generation of coherent algorithm processing.)
- 2013-12-23 20:51:42下载
- 积分:1
-
Matlab-application-manuals
Matlab应用手册,包括Matlab基本操作和应用(Matlab application manuals, including basic operations and applications in Matlab)
- 2012-07-16 11:49:03下载
- 积分:1
-
maxicode.1.4.tar
Maxicode 2D Barcode written in C. It is the latest version what I found.
- 2015-03-27 16:07:46下载
- 积分:1
-
lizisuanfa
可以改善其时延较长的问题,但以往技术是针对每一跳候选节点的休眠时延进行优化的(Implementation algorithm optimization to achieve the connection of WSN)
- 2016-04-18 19:37:52下载
- 积分:1
-
b55055ea-2c2e-473f-922c-7a2ad9ade191CSharp-(1)
symlogi ile ilgili dosyalar
- 2014-09-05 19:35:21下载
- 积分:1
-
myGAOSIDIEDANSUANFAC
高斯迭代算法基本程序,用于求解矩阵方程,对初学者很有帮助(Gauss iterative algorithm for solving the matrix equation, useful for beginners)
- 2012-05-06 21:34:44下载
- 积分:1
-
DmussiccO
阵列天线的DOA估计MUSIIC算法,只有几行简单易懂的代码
(The array antenna DOA estimation MUSIIC algorithm, and only a few lines of easy-to-understand code)
- 2012-08-23 22:20:02下载
- 积分:1