<html><head><title>Re: [Moscow.pm] &ETH;&agrave;&acirc;&iacute;&icirc;&igrave;&aring;&eth;&iacute;&agrave;&yuml;, &eth;&agrave;&iacute;&auml;&icirc;&igrave;&iacute;&agrave;&yuml; &ntilde;&icirc;&eth;&ograve;&egrave;&eth;&icirc;&acirc;&ecirc;&agrave;</title>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
</head>
<body>
<span style=" font-family:'Courier New'; font-size: 9pt;">Здравствуйте, Андрей.<br>
<br>
Нет, нет... Именно без повторений, чтобы небыло, например, aa, или cc<br>
<br>
</span><table>
<tr>
<td width=1 bgcolor= #0000ff><br>
</td>
<td width=1185><span style=" font-family:'courier new'; font-size: 14pt;">use List::Util qw(shuffle);<br>
<span style=" font-size: 9pt;"><br>
2009/12/22 Михаил Монашёв &lt;<a href="mailto:postmaster@softsearch.ru">postmaster@softsearch.ru</a>&gt;<br>
Здравствуйте, dvhillard.<br>
<br>
Задача решается кучей способов. По какому признаку надо выбрать лучший<br>
из них?<br>
<br>
dgc&gt; Есть задачка интересная.<br>
<br>
dgc&gt; На входе такие данные:<br>
dgc&gt; a a a a a b b b c c c c d e e e e e e e e e e<br>
<br>
dgc&gt; Как сделать на выходе, что-то вроде такого:<br>
dgc&gt; b c a e b e c e d e a e c e a c e a e a e b e<br>
<br>
dgc&gt; А лучше, ещё более равномерно.<br>
<br>
dgc&gt; Т.е. нужна рандомная сортировка без повторений.<br>
<br>
dgc&gt; Может у кого-нибудь есть в запасе такая функция?<br>
<br>
dgc&gt; Заранее спасибо :)<br>
<br>
<br>
<br>
<br>
<br>
<span style=" color: #888888;">--<br>
<span style=" color: #000000;"><br>
<span style=" color: #888888;">С уважением,<br>
Михаил Монашёв, SoftSearch.ru<br>
mailto:<a style=" color: #888888;" href="mailto:postmaster@softsearch.ru">postmaster@softsearch.ru</a><br>
ICQ# 166233339<br>
<a style=" color: #888888;" href="http://michael.mindmix.ru/">http://michael.mindmix.ru/</a><br>
Без бэкапа по жизни.<br>
<span style=" color: #000000;"><br>
--<br>
Moscow.pm mailing list<br>
<a href="mailto:moscow-pm@pm.org">moscow-pm@pm.org</a>&nbsp;|&nbsp;<a href="http://moscow.pm.org">http://moscow.pm.org</a></td>
</tr>
</table>
<span style=" font-family:'Courier New'; font-size: 9pt;"><br><br>
<br>
<br>
<span style=" font-family:'arial'; font-size: 8pt; color: #c0c0c0;"><i>--&nbsp;<br>
С уважением,<br>
&nbsp;Dvhillard &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a style=" font-style: normal;" href="mailto:dvhillard@gmail.com">mailto:dvhillard@gmail.com</a></body>