/in/foo.cc: In function 'int main()':
/in/foo.cc:15:51: warning: overflow in implicit constant conversion [-Woverflow]
for(int j = 1; j <= n; j++) F[i][j] = 1000000000000000000LL;
^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:17:54: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
for(int i = 1; i <= n; i++) { scanf("%lld", &a[i]); s[i][i] = i; F[i][i] = 0;}
^
/in/foo.cc:32:29: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
printf("%lld\n", F[1][n]);
^