Language: C

#define Sii(a,b)                si(a);si(b)
#define forn(i,n)               for( int i=0 ; i < n ; i++ )
#define ms(ara_name,value) memset(ara_name,value,sizeof(ara_name))

const int N = 1000;
int n;
double dp[N][N];
int p[N][2];
double d[N][N];
bool vis[N][N];
double calc(int p1,int p2)
{
    int v= max(p1,p2)+1;
    if(v==n-1){
        return d[p1][v] + d[p2][v];
    }
    if(vis[p1][p2]) return dp[p1][p2];
    double r= INF;
    dp[p1][p2] = min( d[p1][v] + calc(v,p2) , d[p2][v] + calc(p1,v));
    vis[p1][p2] = 1;
    return dp[p1][p2];
}
 
int main()
{
 
    while(scanf("%d",&n)==1) {
        for(int i=0;i<n;i++) {
            Sii(p[i][0],p[i][1]);
        }
        forn(i,n)forn(j,n){
            d[i][j] = sqrt((p[i][0]- p[j][0]) * (p[i][0] - p[j][0]) + (p[i][1]-p[j][1])*(p[i][1]-p[j][1]));
        }
        ms(vis,0);
        printf("%f\n", calc(0,0));
    }
    return 0;
}

Compiler output:
main.c:7:8: error: variably modified 'dp' at file scope
    7 | double dp[N][N];
      |        ^~
main.c:7:8: error: variably modified 'dp' at file scope
main.c:8:5: error: variably modified 'p' at file scope
    8 | int p[N][2];
      |     ^
main.c:9:8: error: variably modified 'd' at file scope
    9 | double d[N][N];
      |        ^
main.c:9:8: error: variably modified 'd' at file scope
main.c:10:1: error: unknown type name 'bool'
   10 | bool vis[N][N];
      | ^~~~
main.c:1:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | #define Sii(a,b)                si(a);si(b)
main.c:10:6: error: variably modified 'vis' at file scope
   10 | bool vis[N][N];
      |      ^~~
main.c:10:6: error: variably modified 'vis' at file scope
main.c: In function 'calc':
main.c:13:12: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   13 |     int v= max(p1,p2)+1;
      |            ^~~
main.c:18:15: error: 'INF' undeclared (first use in this function)
   18 |     double r= INF;
      |               ^~~
main.c:18:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:18: error: implicit declaration of function 'min' [-Wimplicit-function-declaration]
   19 |     dp[p1][p2] = min( d[p1][v] + calc(v,p2) , d[p2][v] + calc(p1,v));
      |                  ^~~
main.c: In function 'main':
main.c:27:11: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   27 |     while(scanf("%d",&n)==1) {
      |           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define Sii(a,b)                si(a);si(b)
main.c:27:11: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   27 |     while(scanf("%d",&n)==1) {
      |           ^~~~~
main.c:27:11: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:33: error: implicit declaration of function 'si' [-Wimplicit-function-declaration]
    1 | #define Sii(a,b)                si(a);si(b)
      |                                 ^~
main.c:29:13: note: in expansion of macro 'Sii'
   29 |             Sii(p[i][0],p[i][1]);
      |             ^~~
main.c:32:23: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   32 |             d[i][j] = sqrt((p[i][0]- p[j][0]) * (p[i][0] - p[j][0]) + (p[i][1]-p[j][1])*(p[i][1]-p[j][1]));
      |                       ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | #define Sii(a,b)                si(a);si(b)
main.c:32:23: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   32 |             d[i][j] = sqrt((p[i][0]- p[j][0]) * (p[i][0] - p[j][0]) + (p[i][1]-p[j][1])*(p[i][1]-p[j][1]));
      |                       ^~~~
main.c:32:23: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:3:28: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
    3 | #define ms(ara_name,value) memset(ara_name,value,sizeof(ara_name))
      |                            ^~~~~~
main.c:34:9: note: in expansion of macro 'ms'
   34 |         ms(vis,0);
      |         ^~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'memset'
  +++ |+#include <string.h>
    1 | #define Sii(a,b)                si(a);si(b)
main.c:3:28: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
    3 | #define ms(ara_name,value) memset(ara_name,value,sizeof(ara_name))
      |                            ^~~~~~
main.c:34:9: note: in expansion of macro 'ms'
   34 |         ms(vis,0);
      |         ^~
main.c:3:28: note: include '<string.h>' or provide a declaration of 'memset'
    3 | #define ms(ara_name,value) memset(ara_name,value,sizeof(ara_name))
      |                            ^~~~~~
main.c:34:9: note: in expansion of macro 'ms'
   34 |         ms(vis,0);
      |         ^~
main.c:35:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   35 |         printf("%f\n", calc(0,0));
      |         ^~~~~~
main.c:35:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:35:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:35:9: note: include '<stdio.h>' or provide a declaration of 'printf'