scrabble

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

in: a list of words
out: a legal arrangement for the word on a scrabble board, print an error message if it is impossible.
rule:
- 1st word is places horizontally, the 2nd vertically...
- a word doesn't touch another word (except if it use a letter of this word)
- the next word use the first possible letter of the latest word. for example with "example" and "sample", "sample" must use the 1st letter 'e'.
see input/output for more example

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

one two three for five seven eight ten eleven twelve hundred thousand million billion

Sample output:

     s     t
     eight w
     v   eleven
  five   n l
  o  n     v
three hundred
w
one

/* error with thousand */

Sample input:_

scrabble better destroy execute electric test sample immortal psychology essay nearby natural counter alphabet serial killer labeled

Sample output:

    scrabble
        e
     destroy
      x t
      electric
      c r e m
 k    u   sample
 i    t   t o
 laleled    r
 l          t
serial e    a
 r  l psychology
    p  s
    h  a
  nearby
  a b
  t e
counter
  r
  a
  l

Sample input:_

english french waterfall snowman nowhere active easy yesterday rewrite trilogy god altitude user restaurant error realise special initial bargain keylog

Sample output:

          l
      y t l
     rewrite
      s i i
      t l t r
      e o user
      r god s
      d y e t
      a     a
   easy     u
    c      error
    t       a  e
    i       n  a
s   v       t  l
nowhere        i k
o              special
waterfall      e y n
m    r           l i
a    english     o t
n    n        bargain
     c             a
     h             l

Ranking

Perl _

RankUserSizeTimeDateStatistics
1brx9040.03402013/01/22 03:09:1463B / 336B / 36B

Python _

RankUserSizeTimeDateStatistics
1twobit3660.05632013/01/31 01:39:1421B / 160B / 151B
2rolf9990.09812013/01/30 07:33:360B / 492B / 334B

Brainfuck _

RankUserSizeTimeDateStatistics
1g33k8020.04202013/01/30 10:29:5453B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1nooodl7690.06102013/01/30 03:19:2050B / ?B / ?B

Language Ranking_

RankLangUserSizeScore
1Pythontwobit36610000
2GolfScriptnooodl7694759
3Brainfuckg33k8024563
4Perlbrx9044048

return top