Language: C++

//https://atcoder.jp/contests/dp/tasks/dp_n
#include <bits/stdc++.h>

using namespace std;
#define ll __int64

int main(){
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	ll n;
	cin>>n;
	ll *a=new ll[n];
	ll *pre=new ll[n];
	for(ll i=0; i<n; i++){
		cin>>a[i];
		if(i==0){
			pre[i]=a[i];
		}
		else{
			pre[i]=a[i]+pre[i-1];
		}
	}

	vector<vector<ll>> dp(n, vector<ll>(n, 0));
	for(ll c=1; c<n; c++){
		ll i=0;
		for(ll j=c; j<n; j++){
			dp[i][j]=1e11;
			for(ll k=i; k<j; k++){
				ll part1 = i!=0?pre[k]-pre[i-1]:pre[k];
				ll part2 = pre[j]-pre[k];
				dp[i][j] = min(dp[i][j], dp[i][k]+dp[k+1][j] + part1+part2);
			}
			i++;
		}
	}
	// for(auto x:dp){
	// 	for(auto y:x){
	// 		if(y<10)cout<<" ";
	// 		cout<<y<<" ";
	// 	}
	// 	cout<<endl;
	// }
	cout<<dp[0][n-1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    5 | #define ll __int64
      |            ^~~~~~~
a.cc:10:9: note: in expansion of macro 'll'
   10 |         ll n;
      |         ^~
a.cc:11:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |         cin>>n;
      |              ^
      |              yn
a.cc:12:13: error: 'a' was not declared in this scope
   12 |         ll *a=new ll[n];
      |             ^
a.cc:5:12: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | #define ll __int64
      |            ^~~~~~~
a.cc:12:19: note: in expansion of macro 'll'
   12 |         ll *a=new ll[n];
      |                   ^~
a.cc:13:13: error: 'pre' was not declared in this scope; did you mean 'pread'?
   13 |         ll *pre=new ll[n];
      |             ^~~
      |             pread
a.cc:5:12: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | #define ll __int64
      |            ^~~~~~~
a.cc:13:21: note: in expansion of macro 'll'
   13 |         ll *pre=new ll[n];
      |                     ^~
a.cc:14:16: error: expected ';' before 'i'
   14 |         for(ll i=0; i<n; i++){
      |                ^
a.cc:14:21: error: 'i' was not declared in this scope
   14 |         for(ll i=0; i<n; i++){
      |                     ^
a.cc:5:12: error: template argument 2 is invalid
    5 | #define ll __int64
      |            ^~~~~~~
a.cc:24:23: note: in expansion of macro 'll'
   24 |         vector<vector<ll>> dp(n, vector<ll>(n, 0));
      |                       ^~
a.cc:24:25: error: template argument 1 is invalid
   24 |         vector<vector<ll>> dp(n, vector<ll>(n, 0));
      |                         ^~
a.cc:24:25: error: template argument 2 is invalid
a.cc:24:43: error: template argument 2 is invalid
   24 |         vector<vector<ll>> dp(n, vector<ll>(n, 0));
      |                                           ^
a.cc:24:50: error: expression list treated as compound expression in initializer [-fpermissive]
   24 |         vector<vector<ll>> dp(n, vector<ll>(n, 0));
      |                                                  ^
a.cc:25:16: error: expected ';' before 'c'
   25 |         for(ll c=1; c<n; c++){
      |                ^
a.cc:25:21: error: 'c' was not declared in this scope
   25 |         for(ll c=1; c<n; c++){
      |                     ^
a.cc:26:20: error: expected ';' before 'i'
   26 |                 ll i=0;
      |                    ^
a.cc:27:24: error: expected ';' before 'j'
   27 |                 for(ll j=c; j<n; j++){
      |                        ^
a.cc:27:29: error: 'j' was not declared in this scope; did you mean 'jn'?
   27 |                 for(ll j=c; j<n; j++){
      |                             ^
      |                             jn
a.cc:28:28: error: 'i' was not declared in this scope
   28 |                         dp[i][j]=1e11;
      |                            ^
a.cc:29:32: error: expected ';' before 'k'
   29 |                         for(ll k=i; k<j; k++){
      |                                ^
a.cc:29:37: error: 'k' was not declared in this scope
   29 |                         for(ll k=i; k<j; k++){
      |                                     ^
a.cc:30:36: error: expected ';' before 'part1'
   30 |                                 ll part1 = i!=0?pre[k]-pre[i-1]:pre[k];
      |                                    ^~~~~
a.cc:31:36: error: expected ';' before 'part2'
   31 |                                 ll part2 = pre[j]-pre[k];
      |                                    ^~~~~
a.cc:32:80: error: 'part1' was not declared in this scope
   32 |                                 dp[i][j] = min(dp[i][j], dp[i][k]+dp[k+1][j] + part1+part2);
      |                                                                                ^~~~~
a.cc:32:86: error: 'part2' was not declared in this scope
   32 |                                 dp[i][j] = min(dp[i][j], dp[i][k]+dp[k+1][j] + part1+part2);
      |                                                                                      ^~~~~
a.cc:44:17: error: invalid types 'int[int]' for array subscript
   44 |         cout<<dp[0][n-1];
      |                 ^