**Problem:** https://cses.fi/5/task/C

I could pass the first two sub tasks but my code gives a RE on the last sub task. I think it has something to do with the size of the strings that I am storing in the 2D vector. Can anyone please help me with this?

**CODE:**

```
#include <bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using ll = long long;
int main() {
FASTIO
// freopen("test_input.txt","r",stdin);
// freopen("output.txt","w",stdout);
int n;
cin >> n;
char board[n][n];
for(int i=0; i<n; i++) {
for(int j=0; j<n; j++) {
cin >> board[i][j];
}
}
vector<vector<string>> dp(n, vector<string> (n));
dp[0][0] = board[0][0];
for(int i=1; i<n; i++) {
dp[0][i] = dp[0][i-1] + board[0][i];
dp[i][0] = dp[i-1][0] + board[i][0];
}
for(int i=1; i<n; i++) {
for(int j=1; j<n; j++) {
dp[i][j] = min(dp[i-1][j], dp[i][j-1]) + board[i][j];
}
}
cout << dp[n-1][n-1] << "\n";
return 0;
}
```