Language: C++

// slimes

#include<iostream>
#include<bits/stdc++.h>
#include<algorithm>
#include<iomanip>
#define ll unigned long long
using namespace std;

ll computesum(ll i,ll j,vector<ll>& arr)
{
	ll s=0;
	for(ll x=i;x<=j;x++)
	{
		s+=arr[x];
	}
	return s;
}

void printmat(vector< vector<ll> >& dp,ll r,ll c)
{
	for(ll i=1;i<=r;i++)
	{
		for(ll j=1;j<=c;j++)
		{
			cout<<dp[i][j]<<" ";
		}
		cout<<endl;
	}
}

ll givemin(ll i,ll j,vector<ll>& arr,vector< vector<ll> >& dp)
{
	ll result=INT_MAX;
	ll sum1,sum2,mindp;
	for(ll k=i;k<j;k++)
	{
		sum1=computesum(i,k,arr);
		sum2=computesum(k+1,j,arr);
		mindp=sum1+sum2+dp[i][k]+dp[k+1][j];
		result=min(result,mindp);
	}
	return result;
}

int main()
{
	ll n;
	cin>>n;
	vector<ll> arr(n+1);
	vector< vector<ll> > dp(n+1);
	for(ll i=1;i<=n;i++)
	{
		cin>>arr[i];
	}
	for(ll i=0;i<=n;i++)
	{
		dp[i].resize(n+1,0);
	}
	
	//dp table

	ll s=1;
	while(s<n)
	{
		ll j;
		for(ll i=1;i<=n-s;i++)
		{
			j=i+s;
			dp[i][j]=givemin(i,j,arr,dp);
		}
		s++;
	}
	
	cout<<dp[1][n]<<endl;
//	printmat(dp,n,n);
	return 0;
}


Compiler output:
a.cc:7:12: error: 'unigned' does not name a type; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:10:1: note: in expansion of macro 'll'
   10 | ll computesum(ll i,ll j,vector<ll>& arr)
      | ^~
a.cc:7:12: error: 'unigned' was not declared in this scope; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:20:30: note: in expansion of macro 'll'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                              ^~
a.cc:20:32: error: template argument 1 is invalid
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                                ^
a.cc:20:32: error: template argument 2 is invalid
a.cc:7:12: error: 'unigned' was not declared in this scope; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:20:30: note: in expansion of macro 'll'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                              ^~
a.cc:20:32: error: template argument 1 is invalid
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                                ^
a.cc:20:32: error: template argument 2 is invalid
a.cc:7:12: error: 'unigned' was not declared in this scope; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:20:30: note: in expansion of macro 'll'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                              ^~
a.cc:20:32: error: template argument 1 is invalid
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                                ^
a.cc:20:32: error: template argument 2 is invalid
a.cc:20:23: error: invalid template-id
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                       ^~~~~~
a.cc:7:12: error: 'unigned' was not declared in this scope; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:20:30: note: in expansion of macro 'll'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                              ^~
a.cc:20:34: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                                  ^
a.cc:20:34: note:   expected a type, got 'vector'
a.cc:20:34: error: template argument 2 is invalid
a.cc:7:12: error: 'unigned' has not been declared
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:20:40: note: in expansion of macro 'll'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                                        ^~
a.cc:7:12: error: 'unigned' has not been declared
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:20:45: note: in expansion of macro 'll'
   20 | void printmat(vector< vector<ll> >& dp,ll r,ll c)
      |                                             ^~
a.cc: In function 'void printmat(int&, long long int, long long int)':
a.cc:7:12: error: 'unigned' was not declared in this scope; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:22:13: note: in expansion of macro 'll'
   22 |         for(ll i=1;i<=r;i++)
      |             ^~
a.cc:22:20: error: 'i' was not declared in this scope
   22 |         for(ll i=1;i<=r;i++)
      |                    ^
a.cc:7:20: error: expected ';' before 'long'
    7 | #define ll unigned long long
      |                    ^~~~
a.cc:24:21: note: in expansion of macro 'll'
   24 |                 for(ll j=1;j<=c;j++)
      |                     ^~
a.cc:24:28: error: 'j' was not declared in this scope
   24 |                 for(ll j=1;j<=c;j++)
      |                            ^
a.cc: At global scope:
a.cc:7:12: error: 'unigned' does not name a type; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:32:1: note: in expansion of macro 'll'
   32 | ll givemin(ll i,ll j,vector<ll>& arr,vector< vector<ll> >& dp)
      | ^~
a.cc: In function 'int main()':
a.cc:7:12: error: 'unigned' was not declared in this scope; did you mean 'unsigned'?
    7 | #define ll unigned long long
      |            ^~~~~~~
a.cc:48:9: note: in expansion of macro 'll'
   48 |         ll n;
      |         ^~
a.cc:49:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   49 |         cin>>n;
      |              ^
      |              yn
a.cc:50:18: error: template argument 2 is invalid
   50 |         vector<ll> arr(n+1);
      |                  ^
a.cc:51:26: error: template argument 2 is invalid
   51 |         vector< vector<ll> > dp(n+1);
      |                          ^
a.cc:51:28: error: template argument 1 is invalid
   51 |         vector< vector<ll> > dp(n+1);
      |                            ^
a.cc:51:28: error: template argument 2 is invalid
a.cc:7:20: error: expected ';' before 'long'
    7 | #define ll unigned long long
      |                    ^~~~
a.cc:52:13: note: in expansion of macro 'll'
   52 |         for(ll i=1;i<=n;i++)
      |             ^~
a.cc:52:20: error: 'i' was not declared in this scope
   52 |         for(ll i=1;i<=n;i++)
      |                    ^
a.cc:7:20: error: expected ';' before 'long'
    7 | #define ll unigned long long
      |                    ^~~~
a.cc:56:13: note: in expansion of macro 'll'
   56 |         for(ll i=0;i<=n;i++)
      |             ^~
a.cc:56:20: error: 'i' was not declared in this scope
   56 |         for(ll i=0;i<=n;i++)
      |                    ^
a.cc:7:20: error: expected ';' before 'long'
    7 | #define ll unigned long long
      |                    ^~~~
a.cc:63:9: note: in expansion of macro 'll'
   63 |         ll s=1;
      |         ^~
a.cc:64:15: error: 's' was not declared in this scope
   64 |         while(s<n)
      |               ^
a.cc:7:20: error: expected ';' before 'long'
    7 | #define ll unigned long long
      |                    ^~~~
a.cc:66:17: note: in expansion of macro 'll'
   66 |                 ll j;
      |                 ^~
a.cc:7:20: error: expected ';' before 'long'
    7 | #define ll unigned long long
      |                    ^~~~
a.cc:67:21: note: in expansion of macro 'll'
   67 |                 for(ll i=1;i<=n-s;i++)
      |                     ^~
a.cc:67:28: error: 'i' was not declared in this scope
   67 |                 for(ll i=1;i<=n-s;i++)
      |                            ^
a.cc:69:25: error: 'j' was not declared in this scope; did you mean 'jn'?
   69 |                         j=i+s;
      |                         ^
      |                         jn
a.cc:70:34: error: 'givemin' was not declared in this scope
   70 |                         dp[i][j]=givemin(i,j,arr,dp);
      |                                  ^~~~~~~
a.cc:75:17: error: invalid types 'int[int]' for array subscript
   75 |         cout<<dp[1][n]<<endl;
      |                 ^