uniq words

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

Output words in the input text. If a same word comes twice, you must not output them except for the first one.

If you can read Japanese, here is the description of this problem in Japanese:

http://jp.rubyist.net/magazine/?0025-RubiMaGolf#l7

Options

exec is denied

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

Sample input:_

hoge fuga hige
foo
bar
hoge fuga hige
baz
bar
fuga hoge

Sample output:

hoge
fuga
hige
foo
bar
baz

Sample input:_

0) Score: 7.539441541679835 Run Time: 8 ms
1) Score: 57.002204510175204 Run Time: 28 ms
2) Score: 378.61727983681493 Run Time: 151 ms
3) Score: 3506.305460036255 Run Time: 921 ms
4) Score: 68938.08935837781 Run Time: 10192 ms
5) Score: 37849.46712165623 Run Time: 7841 ms
6) Score: 71335.89142938383 Run Time: 15858 ms
7) Score: 71297.4599064055 Run Time: 15993 ms
8) Score: 38269.501940897455 Run Time: 9720 ms
9) Score: 55518.37970948987 Run Time: 12329 ms

Sample output:

0)
Score:
7.539441541679835
Run
Time:
8
ms
1)
57.002204510175204
28
2)
378.61727983681493
151
3)
3506.305460036255
921
4)
68938.08935837781
10192
5)
37849.46712165623
7841
6)
71335.89142938383
15858
7)
71297.4599064055
15993
8)
38269.501940897455
9720
9)
55518.37970948987
12329

Sample input:_

  /home/i/src/grub2/commands:
  total used in directory 364 available 4554932
  drwxrwxr-x  6 i i  4096 Apr 29 01:36 .
  drwxrwxr-x 26 i i 49152 Apr 29 01:37 ..
  drwxrwxr-x  6 i i  4096 Apr 29 01:36 .svn
  -rw-rw-r--  1 i i  3344 Apr 29 01:36 blocklist.c
  -rw-rw-r--  1 i i  4565 Apr 29 01:36 boot.c
  -rw-rw-r--  1 i i  2228 Apr 29 01:36 cat.c
  -rw-rw-r--  1 i i  2879 Apr 29 01:36 cmp.c
  -rw-rw-r--  1 i i  2071 Apr 29 01:36 configfile.c
  -rw-rw-r--  1 i i  1771 Apr 29 01:36 crc.c
  -rw-rw-r--  1 i i  3649 Apr 29 01:36 date.c
  -rw-rw-r--  1 i i  2572 Apr 29 01:36 echo.c
  drwxrwxr-x  3 i i  4096 Apr 29 01:36 efi
  -rw-rw-r--  1 i i  2445 Apr 29 01:36 extcmd.c
  -rw-rw-r--  1 i i  1601 Apr 29 01:36 halt.c
  -rw-rw-r--  1 i i  3062 Apr 29 01:36 handler.c
  -rw-rw-r--  1 i i 12074 Apr 29 01:36 hdparm.c
  -rw-rw-r--  1 i i  2811 Apr 29 01:36 help.c
  -rw-rw-r--  1 i i  3637 Apr 29 01:36 hexdump.c
  drwxrwxr-x  4 i i  4096 Feb 15 17:55 i386
  drwxrwxr-x  3 i i  4096 Feb 15 17:55 ieee1275
  -rw-rw-r--  1 i i  9943 Apr 29 01:36 loadenv.c
  -rw-rw-r--  1 i i  6438 Apr 29 01:36 ls.c
  -rw-rw-r--  1 i i  1613 Apr 29 01:36 lsmmap.c
  -rw-rw-r--  1 i i  4921 Apr 29 01:36 lspci.c
  -rw-rw-r--  1 i i  3101 Apr 29 01:36 memrw.c
  -rw-rw-r--  1 i i  8873 Apr 29 01:36 minicmd.c
  -rw-rw-r--  1 i i  8357 Apr 29 01:36 parttool.c
  -rw-rw-r--  1 i i  1949 Apr 29 01:36 read.c
  -rw-rw-r--  1 i i  1620 Apr 29 01:36 reboot.c
  -rw-rw-r--  1 i i  5273 Apr 29 01:36 search.c
  -rw-rw-r--  1 i i  2699 Apr 29 01:36 sleep.c
  -rw-rw-r--  1 i i 10828 Apr 29 01:36 test.c
  -rw-rw-r--  1 i i  4117 Apr 29 01:36 usbtest.c
  -rw-rw-r--  1 i i 50132 Apr 29 01:36 videotest.c
  -rw-rw-r--  1 i i 49662 Apr 29 01:36 videotest.c.mine
  -rw-rw-r--  1 i i  6633 Apr 29 01:36 videotest.c.r1964
  -rw-rw-r--  1 i i  6477 Apr 29 01:36 videotest.c.r2148

Sample output:

/home/i/src/grub2/commands:
total
used
in
directory
364
available
4554932
drwxrwxr-x
6
i
4096
Apr
29
01:36
.
26
49152
01:37
..
.svn
-rw-rw-r--
1
3344
blocklist.c
4565
boot.c
2228
cat.c
2879
cmp.c
2071
configfile.c
1771
crc.c
3649
date.c
2572
echo.c
3
efi
2445
extcmd.c
1601
halt.c
3062
handler.c
12074
hdparm.c
2811
help.c
3637
hexdump.c
4
Feb
15
17:55
i386
ieee1275
9943
loadenv.c
6438
ls.c
1613
lsmmap.c
4921
lspci.c
3101
memrw.c
8873
minicmd.c
8357
parttool.c
1949
read.c
1620
reboot.c
5273
search.c
2699
sleep.c
10828
test.c
4117
usbtest.c
50132
videotest.c
49662
videotest.c.mine
6633
videotest.c.r1964
6477
videotest.c.r2148

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1shinh190.40542009/04/29 14:21:040B / 13B / 5B
2leonid190.03312009/04/29 14:25:500B / 14B / 3B
3ksk190.32952009/04/29 22:15:570B / 13B / 5B
4murky-satyr190.04682009/05/01 06:59:290B / 14B / 3B
5niha190.36562009/05/02 21:50:080B / 14B / 4B
6uru190.06982009/05/07 01:53:490B / 14B / 3B
7kurimura190.06062009/05/10 13:38:180B / 13B / 6B
8hajimehoshi200.12992009/05/02 18:12:540B / ?B / ?B
9N_200.11792009/05/07 01:35:380B / 13B / 7B
10kaki200.04472009/05/07 02:24:310B / 13B / 7B
11Zauberer210.14292009/05/02 23:13:030B / 14B / 6B
12con_mame220.05932009/05/03 02:53:420B / ?B / ?B
13@tttttanaka190.05412012/03/23 22:27:100B / 14B / 4B
14yosio220.04852011/06/07 02:26:470B / ?B / ?B
15holmes290.00582010/06/07 20:58:290B / ?B / ?B
16kyanny290.05302011/06/07 01:27:350B / 17B / 11B

Perl _

RankUserSizeTimeDateStatistics
1ySas310.09792009/04/30 21:14:310B / 16B / 12B
2leonid320.02752009/04/30 01:48:480B / 17B / 12B
3Mithran320.95412009/04/30 06:46:130B / 16B / 14B
4shinh330.06372009/05/03 10:37:590B / 17B / 13B
5zetamatta400.34622009/04/29 23:31:310B / 20B / 18B
6ais523410.06342009/05/08 05:35:021B / ?B / ?B

Python _

RankUserSizeTimeDateStatistics
1hallvabo720.63332009/04/29 20:00:230B / 41B / 19B
2lifthrasiir720.14232009/05/02 02:54:210B / 41B / 19B
3leonid720.08922009/05/06 08:37:190B / 41B / 19B
4dekosuke730.10142009/05/02 20:25:500B / 43B / 16B
5kt3k740.15372009/04/30 12:18:280B / 41B / 20B
6zetamatta750.26932009/04/29 23:52:410B / 44B / 16B
7primo750.32242009/04/30 07:23:520B / 43B / 16B
8dplusplus770.15172009/04/30 19:06:100B / 47B / 17B
9pankdm780.07132010/05/22 21:35:203B / ?B / ?B

PHP _

RankUserSizeTimeDateStatistics
1murky-satyr730.12422009/05/03 01:51:090B / 46B / 24B
2tester7860.20262009/05/03 00:34:160B / 53B / 30B
3clock(pooq)610.10392011/10/17 15:59:154B / 37B / 20B
4pooq650.09812009/05/13 17:33:460B / 39B / 25B

Scheme _

RankUserSizeTimeDateStatistics
1murky-satyr960.16102009/05/04 06:50:340B / 51B / 40B

Common LISP _

RankUserSizeTimeDateStatistics
1kozima920.43002009/04/30 18:42:270B / 56B / 32B
2youz990.38602009/05/11 23:56:370B / 63B / 32B
3ttmh900.15122015/06/05 21:04:250B / 55B / 30B
4kozima910.44702009/05/13 18:40:370B / 56B / 32B

Arc _

RankUserSizeTimeDateStatistics
1murky-satyr4110.33952009/10/31 20:38:270B / 27B / 13B
2pooq4812.24822009/10/31 10:01:210B / 37B / 9B

Clojure _

RankUserSizeTimeDateStatistics
1uochan845.35482010/11/23 21:33:300B / ?B / ?B
2murky-satyr895.20902010/05/31 10:56:520B / 62B / 22B

Io _

RankUserSizeTimeDateStatistics
1pooq621.01722009/04/29 18:23:490B / 55B / 2B
2murky-satyr621.04872009/05/01 07:20:130B / 55B / 2B

JavaScript _

RankUserSizeTimeDateStatistics
1murky-satyr580.10102009/05/01 07:07:400B / 29B / 29B
2nn580.07212009/05/01 11:23:550B / 31B / 27B
3murasekoji760.07682009/05/03 01:43:150B / ?B / ?B
4hoge870.09982009/05/03 00:28:570B / ?B / ?B

Lua _

RankUserSizeTimeDateStatistics
1murky-satyr620.07072009/05/01 07:40:590B / 37B / 21B
2zetamatta670.14302009/04/29 22:58:280B / 38B / 25B

BASIC _

RankUserSizeTimeDateStatistics
1pooq1200.60732009/05/04 18:06:300B / 62B / 45B

J _

RankUserSizeTimeDateStatistics
1pooq270.20602009/05/09 22:45:490B / 13B / 14B
2I., S.250.07972011/11/10 22:53:170B / 16B / 8B

K _

RankUserSizeTimeDateStatistics
1teebee330.02792012/07/04 07:59:180B / 6B / 23B

C _

RankUserSizeTimeDateStatistics
1ozy4dm750.08452009/05/09 16:33:480B / 40B / 35B
27gyou750.07182009/05/09 20:18:240B / 40B / 35B
351b870.04592009/04/29 21:10:070B / 47B / 40B
4G.w.1210.05782009/05/05 08:50:530B / 60B / 60B
5Raider1810.04302009/05/13 07:45:330B / 85B / 95B
6inaniwa1170.08932009/11/10 13:04:180B / 59B / 57B

C++ _

RankUserSizeTimeDateStatistics
17gyou1130.29482009/05/04 00:39:370B / 60B / 50B
2ebrahim1300.06432009/05/02 05:39:412B / ?B / ?B

D _

RankUserSizeTimeDateStatistics
151b1020.03932009/05/01 20:50:160B / 68B / 32B

OCaml _

RankUserSizeTimeDateStatistics
1ksk862.47642009/07/25 22:02:370B / 47B / 33B

Haskell _

RankUserSizeTimeDateStatistics
1notogawa430.16712009/04/29 18:02:310B / 37B / 4B
2Defenestrator430.15892009/04/30 07:35:570B / 37B / 5B
3konn430.04722009/04/30 22:41:370B / ?B / ?B
4tttaki430.13042009/05/01 21:46:260B / 37B / 4B

Pascal _

RankUserSizeTimeDateStatistics
1uru1410.06272009/05/07 23:37:190B / 88B / 46B

Curry _

RankUserSizeTimeDateStatistics
1pooq450.16342009/11/10 08:13:270B / 37B / 4B

AWK _

RankUserSizeTimeDateStatistics
1nn240.02662009/04/30 22:32:050B / 10B / 13B
2yamaya280.03602009/04/30 00:23:570B / 12B / 15B
3eban280.03102009/04/30 01:45:050B / 11B / 16B
4zetamatta380.03212009/04/29 23:24:550B / 17B / 20B

sed _

RankUserSizeTimeDateStatistics
1emoken930.50352009/05/05 00:29:350B / 22B / 59B
2shinh970.58442009/05/03 14:17:520B / 27B / 54B

Bash _

RankUserSizeTimeDateStatistics
1waldner280.11742009/05/12 08:28:260B / 9B / 15B
2eban470.20482009/04/30 02:22:430B / 27B / 13B
3eban230.50452011/11/10 19:41:560B / 12B / 9B

Postscript _

RankUserSizeTimeDateStatistics
1yshl(bin)601.24722009/05/09 23:01:0229B / 16B / 14B
2ySas601.52922009/05/10 04:53:0922B / 16B / 21B
3yshl1061.23102009/05/09 23:00:540B / 77B / 19B

R _

RankUserSizeTimeDateStatistics
1pooq343.53822009/05/02 22:57:560B / 20B / 14B
2pooq330.42792012/10/25 15:25:580B / 21B / 12B

GolfScript _

RankUserSizeTimeDateStatistics
1leonid120.21892009/05/02 04:51:450B / 3B / 8B
2kt3k140.21902009/04/30 02:49:360B / 2B / 11B
3whio120.08202017/02/07 05:41:420B / 3B / 8B

Burlesque _

RankUserSizeTimeDateStatistics
1teebee160.03872012/09/22 23:14:460B / 8B / 6B
2mroman (teebee)180.05082012/09/22 23:25:430B / 11B / 7B
3mroman200.04462012/09/22 22:53:070B / 12B / 8B

z80 _

RankUserSizeTimeDateStatistics
1kodera390.04002009/06/19 14:55:0924B / 9B / 5B

Vim _

RankUserSizeTimeDateStatistics
1nn561.55932009/10/18 20:20:026B / 25B / 17B

goruby _

RankUserSizeTimeDateStatistics
1murky-satyr100.22582009/05/01 06:42:570B / 5B / 4B
2leonid100.17682009/05/01 07:09:400B / 4B / 6B
3murky-satyr90.08582009/12/22 15:39:330B / 4B / 4B

Groovy _

RankUserSizeTimeDateStatistics
1murky-satyr479.10372009/05/01 07:26:080B / 32B / 15B
2nn478.92922009/05/01 10:05:360B / 33B / 13B

Scala _

RankUserSizeTimeDateStatistics
1murky-satyr6222.41192011/06/16 21:08:020B / 49B / 11B

Logo _

RankUserSizeTimeDateStatistics
1teebee530.06862011/03/27 12:48:560B / 43B / 3B

Language Ranking_

RankLangUserSizeScore
1gorubymurky-satyr910000
2GolfScriptleonid127500
3Burlesqueteebee165625
4Rubyshinh194736
5Basheban233913
6AWKnn243750
7JI., S.253600
8PerlySas312903
9Kteebee332727
10Rpooq332727
11z80kodera392307
12Arcmurky-satyr412195
13Haskellnotogawa432093
14Currypooq452000
15Groovymurky-satyr471914
16Logoteebee531698
17Vimnn561607
18JavaScriptmurky-satyr581551
19Postscriptyshl(bin)601500
20PHPclock(pooq)611475
21Iopooq621451
22Luamurky-satyr621451
23Scalamurky-satyr621451
24Pythonhallvabo721250
25Cozy4dm751200
26Clojureuochan841071
27OCamlksk861046
28Common LISPttmh901000
29sedemoken93967
30Schememurky-satyr96937
31D51b102882
32C++7gyou113796
33BASICpooq120750
34Pascaluru141638

return top