Skip to main content
included suggestion from @ceilingcat
Source Link

C++ (gcc), 7575 71 6767 65 bytes

int f(int*a,int s){int r=1;for(;--s>0;s;)r*=a[s]>=2*a[s-1];return r;}

Try it online!Try it online!

C++ (gcc), 75 71 67 bytes

int f(int*a,int s){int r=1;for(;--s>0;)r*=a[s]>=2*a[s-1];return r;}

Try it online!

C++ (gcc), 75 71 67 65 bytes

int f(int*a,int s){int r=1;for(;--s;)r*=a[s]>=2*a[s-1];return r;}

Try it online!

Applied suggestions, improved score
Source Link

C++ (gcc), 7575 71 67 bytes

int f(int*a,int s){for(int i=1;i<s;++i)ifr=1;for(a[i]<2*a[i;-1]-s>0;)return 0;returnr*=a[s]>=2*a[s-1];return 1;r;}

Try it online!Try it online!

C++ (gcc), 75 bytes

int f(int*a,int s){for(int i=1;i<s;++i)if(a[i]<2*a[i-1])return 0;return 1;}

Try it online!

C++ (gcc), 75 71 67 bytes

int f(int*a,int s){int r=1;for(;--s>0;)r*=a[s]>=2*a[s-1];return r;}

Try it online!

Source Link

C++ (gcc), 75 bytes

int f(int*a,int s){for(int i=1;i<s;++i)if(a[i]<2*a[i-1])return 0;return 1;}

Try it online!