[TASK]:
You will be given lines of pseudocode, your task is to write the corresponding C++ code. The pseudocode will provide detailed description of the c++ code line by line. The pseudocode is garanteed to be correct and complete.

[INSTRUCTION]:
The following libraries are already included in the code.
```cpp
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <fstream>
#include <climits>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <bitset>
using namespace std;
```
Do not include them in your code again. Please surround your code with ```cpp and ``` markers. Note that the code should correspond to the pseudocode line by line.

[PSEUDOCODE]:
create 3d long long array DP with size 100005 by 205 by 2, create long long arrays sum1, sum2 with sum1 size 205, sum2 size 205
create long long array ar with size 100005
create long long N
define the main function
    read N
    for i = 0 to N exclusive, read ar[i]
    if ar[0] is -1
        set sum1[0] to 0
        for i = 1 to 200 inclusive
            set DP[0][i][0] to 1
            set sum1[i] to sum1[i-1] + DP[0][i][0]
        end of the block
    else
        set DP[0][ar[0]][0] to 1
        set sum1[0] to 0
        for i = 1 to 200 inclusive, set sum1[i] to sum1[i-1] + DP[0][i][0]
    end of the block
    for i = 1 to N exclusive
        if ar[i] is -1
            for j = 1 to 200 inclusive
                increment DP[i][j][0] by sum1[j-1]
                set DP[i][j][0] to DP[i][j][0] % 998244353
                increment DP[i][j][1] by DP[i-1][j][0]
                set DP[i][j][1] to DP[i][j][1] % 998244353
                increment DP[i][j][0] by sum2[j-1]
                set DP[i][j][0] to DP[i][j][0] % 998244353
            end of the block
            for j = 1 to 200 inclusive
                increment DP[i][j][1] by (sum2[200] - sum2[j - 1] + 998244353)
                set DP[i][j][1] to DP[i][j][1] % 998244353
            end of the block
        else
            increment DP[i][ar[i]][0] by (sum1[ar[i] - 1]) + (sum2[ar[i] - 1])
            set DP[i][ar[i]][0] to DP[i][ar[i]][0] % 998244353
            increment DP[i][ar[i]][1] by DP[i - 1][ar[i]][0]
            set DP[i][ar[i]][1] to DP[i][ar[i]][1] % 998244353
            increment DP[i][ar[i]][1] by (sum2[200] - sum2[ar[i] - 1] + 998244353)
            set DP[i][ar[i]][1] to DP[i][ar[i]][1] % 998244353
        end of the block
        set sum1[0] to 0
        set sum2[0] to 0
        for j = 1 to 200 inclusive
            set sum1[j] to sum1[j-1] + DP[i][j][0]
            set sum1[j] to sum1[j] % 998244353
            set sum2[j] to sum2[j-1] + DP[i][j][1]
            set sum2[j] to sum2[j] % 998244353
        end of the block
    end of the block
    print (sum2[200]) % 998244353 print newline
    return 0 from function
end of the block

[CODE]:

long long DP[100005][205][2], sum1[205], sum2[205];
long long ar[100005];
long long N;
int main() {
    cin >> N;
    for (long long i = 0; i < N; i++) cin >> ar[i];
    if (ar[0] == -1) {
        sum1[0] = 0;
        for (long long i = 1; i <= 200; i++) {
            DP[0][i][0] = 1;
            sum1[i] = sum1[i - 1] + DP[0][i][0];
        }
    } else {
        DP[0][ar[0]][0] = 1;
        sum1[0] = 0;
        for (long long i = 1; i <= 200; i++) sum1[i] = sum1[i - 1] + DP[0][i][0];
    }
    for (long long i = 1; i < N; i++) {
        if (ar[i] == -1) {
            for (long long j = 1; j <= 200; j++) {
                DP[i][j][0] += (sum1[j - 1]);
                DP[i][j][0] %= 998244353;
                DP[i][j][1] += DP[i - 1][j][0];
                DP[i][j][1] %= 998244353;
                DP[i][j][0] += (sum2[j - 1]);
                DP[i][j][0] %= 998244353;
            }
            for (long long j = 1; j <= 200; j++) {
                DP[i][j][1] += (sum2[200] - sum2[j - 1] + 998244353);
                DP[i][j][1] %= 998244353;
            }
        } else {
            DP[i][ar[i]][0] += (sum1[ar[i] - 1]) + (sum2[ar[i] - 1]);
            DP[i][ar[i]][0] %= 998244353;
            DP[i][ar[i]][1] += DP[i - 1][ar[i]][0];
            DP[i][ar[i]][1] %= 998244353;
            DP[i][ar[i]][1] += (sum2[200] - sum2[ar[i] - 1] + 998244353);
            DP[i][ar[i]][1] %= 998244353;
        }
        sum1[0] = 0;
        sum2[0] = 0;
        for (long long j = 1; j <= 200; j++) {
            sum1[j] = sum1[j - 1] + DP[i][j][0];
            sum1[j] %= 998244353;
            sum2[j] = sum2[j - 1] + DP[i][j][1];
            sum2[j] %= 998244353;
        }
    }
    cout << (sum2[200]) % 998244353 << endl;
    return (0);
}