Language: C++

#include<stdlib.h>
p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}

Compiler output:
a.cc:2:1: error: ISO C++ forbids declaration of 'p' with no type [-fpermissive]
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      | ^
a.cc:2:30: error: 'd' does not name a type
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                              ^
a.cc:2:46: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                              ^~~~
a.cc: In function 'int main()':
a.cc:2:73: error: 'V' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                         ^
a.cc:2:76: error: 'd' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                            ^
a.cc:2:59: error: 'scanf' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                           ^~~~~
a.cc:2:93: error: 'c' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                                             ^
a.cc:2:79: error: 'printf' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                               ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<stdlib.h>
  +++ |+#include <cstdio>
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
a.cc:2:101: error: 'f' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                                                     ^
a.cc:2:113: error: 'i' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                                                                 ^
a.cc:2:160: error: 'f' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                                                                                                                ^
a.cc:2:173: error: 'i' was not declared in this scope
    2 | p(int*a,int*b){return *a-*b;}d,c,V,i,f[1001];main(){for(;~scanf("%d%d",&V,&d);printf("%d\n",c)){for(f[1]=3,f[0]=i=2;i<V;)f[i]=(f[i-1]+f[i++-2])%1001;for(qsort(f,V,4,p),c=1;i;f[i]-f[--i]<d?:c++);}}
      |                                                                                                                                                                             ^