Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Top Challenge Entrants

  # User Points
  1 jaytea 587
  2 [Znork] 303
  3 urza 297
  4 Ag2X 288
  5 dr_Eamer 255
  6 Albie 199
  7 Chessnut 197
  8 A Noniem 194
  9 zzattack 186
  10 Kol 185
  11 m910q 168
  12 Sephiroth 115
  13 Auron956 114
  14 patje 114
  15 chid 110
  16 Ohad2121 92
  17 SkorpSSS 87
  18 DixrouE 84
  19 Suchorski 83
  20 ^Vampire^ 74
Challenge:Smallest $reduce
Start:May 3rd 2010
End:May 7th 2010
Description:

In this challenge you are asked to create an alias that will compress a string of characters that are in alphabetical order.



Syntax

$reduce(<a-z characters to compress>)


Input:

  • $1 will only contain a-z characters in lowercase
  • $len($1) will be <= 200
  • no validation is needed -- asume the correct input is always passed

Output:

  • your alias must return the output where there are 3 or more characters in alphabetical order and convert it into a range i.e. $reduce(abc) = a-c
  • characters can go "backwards" which must be reduced too i.e. $reduce(cba) = c-a
  • must work for a using more than one range set i.e.: $reduce(abcba) = a-c-a

Examples

simple examples:
$reduce(abcd) = a-d
$reduce(hijlbcd) = h-jlb-d
$reduce(ihdlkioabcihgfe) = ihdlkioa-ci-e

going backwards:
$reduce(cba) = c-a
$reduce(zyx) = z-x

using more than one range:
$reduce(abcdcba) = a-d-a
$reduce(abcddcba) = a-dd-a
$reduce(abcba) = a-c-a
$reduce(abcbabcdefgfec) =a-c-a-g-ec





Example:


$reduce(cba) = c-a
$reduce(abcddcba) = a-dd-a
$reduce(abcd) = a-d
$reduce(hijlbcd) =  h-jlb-d
$reduce(abcdefghijklmnopqrstuvwxyz) = a-z
$reduce(abhijklmnopqrstucdefgvwxyz) = abh-uc-gv-z
$reduce(ihdlkioabcihgfe) = ihdlkioa-ci-e
$reduce(aaabcd) = aaa-d
$reduce(zzzyxqrstuv) = zzz-xq-v
$reduce(abcdcba) = a-d-a
$reduce(abcbabcdefgfec) =a-c-a-g-ec


Rules:

  • Alias name must be 'reduce'
  • No dlls, coms, sockets, jaytea
  • One submission per user per entry type.
  • Script must give correct results after consecutive runs.


  • Testing conditions:

  • Alias will be run on mIRC v6.35 and loaded into the alias section i.e. NO alias { }.
  • Must have balanced brackets
  • Your code will be taken for EXACTLY as-is.
  • Alias will be run on a mIRC with no variables set - a clean mIRC.