文件名称:001bianchengzhuji
介绍说明--下载内容均来自于网络,请自行研究使用
你有一条项链,它由 N 个随机排列的红、白和蓝色的珠子组成(3<=N<=350).想从项链的某处将它截断拉直;接着从一端向另外一端数收集同颜色的珠子,直到碰到一个不同颜色的珠子为止;然后再从另外一端做同样的操作。(一端收集的珠子颜色可以不同于另一端的。)想办法找到一个截断项链的位置,能够让我们尽量多地收集到同色的珠子。-You have a necklace, which consists of N random arrangement of red, white and blue beads composition (3 < = N < = 350). Want to truncate it somewhere necklace straightening followed from one end to the other end of the number of collection of beads of different colors, until he came up with a different color of beads and then from the other side to do the same operation. (End of the collection of beads color may be different from the other end.) Try to find a truncated necklace location, allowing us to collect as much as possible the same color beads.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
001 编程珠玑.cpp