Golfy ARrays

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

A golfy array is an array of positive integers, where each element is higher than or equal to the arithmetic mean of all the previous terms. Print 1 if the array is golfy and 0 otherwise.

Options

no deadline, the server will not save your submission

Sample input:_

[1, 4, 3, 8, 6]

Sample output:

1

Sample input:_

[6, 6, 6, 6, 6]

Sample output:

1

Sample input:_

[45, 45, 46, 43]

Sample output:

0

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs60.02232017/10/15 03:25:380B / 4B / 1B
2Histocrat60.02372017/10/17 04:54:520B / 2B / 4B
3rotary-o60.04792021/01/03 16:06:180B / 2B / 4B

Ruby2 _

RankUserSizeTimeDateStatistics
1Histocrat60.14382017/10/18 04:36:350B / 2B / 4B
2mitchs60.14622017/10/18 07:41:410B / 2B / 4B
3rotary-o60.16552021/01/03 16:04:540B / 2B / 4B
4letranger120.14612017/10/23 18:31:150B / 9B / 3B

Perl _

RankUserSizeTimeDateStatistics
1brx90.00042018/01/08 21:54:160B / 6B / 3B
2llhuii90.00042018/01/08 22:12:110B / 6B / 3B

Python _

RankUserSizeTimeDateStatistics
1rolf130.07092017/10/15 00:03:400B / 9B / 3B
2mitchs130.06972017/10/15 06:38:450B / 9B / 3B
3llhuii130.06962018/01/08 22:18:050B / 9B / 3B
4hallvabo130.07112018/11/12 22:37:280B / 9B / 3B
5McBusLuck130.08952020/11/23 01:21:410B / 9B / 3B
6Erik the Outgolfer130.08092021/02/03 06:41:300B / 9B / 3B
7test200.07432017/11/03 04:48:050B / 13B / 5B
8Someone210.11092017/10/15 20:09:260B / 12B / 9B

Python3 _

RankUserSizeTimeDateStatistics
1mitchs150.11552017/10/15 06:40:300B / 8B / 7B
2llhuii150.11872018/01/08 22:24:050B / 8B / 7B
3McBusLuck150.13422020/11/23 01:23:040B / 8B / 7B
4fill210.11842017/11/10 15:42:220B / 14B / 7B
5mypetlion210.11442017/12/02 00:39:160B / 14B / 7B
6rolf250.11802017/10/14 23:55:140B / 12B / 13B

JavaScript _

RankUserSizeTimeDateStatistics
1ETHproductions170.03912017/10/18 03:37:310B / 13B / 3B
2FizzyTea170.06652017/11/08 02:11:020B / 13B / 3B
3ZED.CWT230.03622018/06/08 14:53:310B / 15B / 8B

Tcl _

RankUserSizeTimeDateStatistics
1toomas280.03942019/01/23 00:11:040B / 19B / 5B

Xtal _

RankUserSizeTimeDateStatistics
1pooq290.04042017/11/26 22:12:190B / ?B / ?B

Crystal _

RankUserSizeTimeDateStatistics
1pooq80.04552021/04/09 06:19:040B / ?B / ?B

PARI/GP _

RankUserSizeTimeDateStatistics
1mitchs150.07132017/10/15 06:20:490B / 11B / 4B
2pooq150.05162021/04/14 23:36:060B / ?B / ?B

Forth _

RankUserSizeTimeDateStatistics
1pooq190.05502021/05/06 08:58:040B / ?B / ?B

BASIC _

RankUserSizeTimeDateStatistics
1pooq163.00452017/11/25 21:29:290B / ?B / ?B

J _

RankUserSizeTimeDateStatistics
1pooq120.05502017/11/26 17:21:570B / ?B / ?B

K _

RankUserSizeTimeDateStatistics
1pooq70.04312021/04/10 02:30:190B / ?B / ?B

Jelly _

RankUserSizeTimeDateStatistics
1pooq40.44762021/04/09 05:49:450B / ?B / ?B

C _

RankUserSizeTimeDateStatistics
1llhuii270.00042018/01/08 22:22:240B / 15B / 12B

Haskell _

RankUserSizeTimeDateStatistics
1cojna300.03642018/05/29 15:26:070B / 23B / 6B
2henkma300.03652018/05/29 18:23:070B / ?B / ?B
3dianne310.03592018/05/28 14:25:510B / 20B / 10B
4yuki430.03672018/01/30 11:59:240B / ?B / ?B

Asymptote _

RankUserSizeTimeDateStatistics
1pooq190.23272021/04/09 21:43:070B / ?B / ?B

AWK _

RankUserSizeTimeDateStatistics
1mitchs80.03112017/10/15 16:50:500B / 3B / 4B
2teebee80.03232017/10/16 06:52:440B / 2B / 6B
3Hendrik80.03112017/10/29 06:14:530B / 3B / 5B
4llhuii80.03242018/01/08 22:20:330B / 5B / 3B
5uu80.03102018/02/23 08:50:270B / 2B / 6B
6McBusLuck80.04112020/11/20 09:19:450B / 5B / 3B

sed _

RankUserSizeTimeDateStatistics
10mg80.03122019/10/25 22:25:260B / 5B / 2B
2McBusLuck80.04212020/11/18 03:31:500B / 5B / 2B

jq _

RankUserSizeTimeDateStatistics
1pooq80.04122017/11/30 02:53:010B / ?B / ?B

Bash (builtins) _

RankUserSizeTimeDateStatistics
1McBusLuck110.02042021/04/09 04:34:450B / 4B / 7B
2llhuii140.00042018/01/09 15:08:410B / 6B / 7B

bc _

RankUserSizeTimeDateStatistics
1McBusLuck160.04242020/08/11 03:12:040B / 9B / 6B

xgawk _

RankUserSizeTimeDateStatistics
1mitchs80.03182017/11/05 12:04:120B / 3B / 4B
2llhuii80.03862018/01/08 22:20:380B / 5B / 3B
3McBusLuck80.04272020/11/20 09:19:550B / 5B / 3B

R _

RankUserSizeTimeDateStatistics
1pooq180.29712017/11/25 22:10:000B / ?B / ?B
2olf180.31472019/08/31 20:02:460B / 12B / 6B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs (cheat)140.06292017/10/15 15:32:590B / 0B / 14B
2McBusLuck210.08062020/11/15 21:52:301B / 2B / 18B
3mitchs230.03132017/10/15 15:39:320B / 0B / 23B

GolfScript _

RankUserSizeTimeDateStatistics
1mitchs30.05102017/10/15 04:00:500B / 1B / 2B
2McBusLuck30.05872020/12/01 04:23:430B / 1B / 2B

gs2 _

RankUserSizeTimeDateStatistics
1mitchs20.18992017/10/15 04:02:340B / 1B / 1B
2whio20.17692017/10/17 00:29:100B / 2B / 0B
3McBusLuck20.20622020/11/12 00:17:170B / 1B / 1B

Burlesque _

RankUserSizeTimeDateStatistics
1Hendrik50.03302017/10/15 01:04:470B / 3B / 2B

Universal Lambda _

RankUserSizeTimeDateStatistics
1lynn170.04302021/01/11 12:33:5315B / 2B / 0B

z80 _

RankUserSizeTimeDateStatistics
1McBusLuck110.04262021/04/10 18:37:017B / 3B / 1B

Scala _

RankUserSizeTimeDateStatistics
1rotary-o225.31082017/10/15 14:15:300B / 18B / 4B
2Hendrik224.17402017/11/25 12:38:070B / 15B / 7B
3teebee225.39292018/01/25 07:58:090B / 18B / 4B
4clock224.19612019/11/19 19:45:160B / 14B / 8B

Language Ranking_

RankLangUserSizeScore
1gs2mitchs210000
2GolfScriptmitchs36666
3Jellypooq45000
4BurlesqueHendrik54000
5Rubymitchs63333
6Ruby2Histocrat63333
7Kpooq72857
8AWKmitchs82500
9xgawkmitchs82500
10jqpooq82500
11sed0mg82500
12Crystalpooq82500
13Perlbrx92222
14Bash (builtins)McBusLuck111818
15z80McBusLuck111818
16Jpooq121666
17Pythonrolf131538
18Brainfuckmitchs (cheat)141428
19PARI/GPmitchs151333
20Python3mitchs151333
21BASICpooq161250
22bcMcBusLuck161250
23JavaScriptETHproductions171176
24Universal Lambdalynn171176
25Rpooq181111
26Asymptotepooq191052
27Forthpooq191052
28Scalarotary-o22909
29Cllhuii27740
30Tcltoomas28714
31Xtalpooq29689
32Haskellcojna30666

return to the top page