[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 integers n, i, rez, sum, sum1, integer array DP of sizes 2, 2, and 205, integer array A of size 100005, and create integers cr, j
in function f that takes in arguments integer address a, integer b, and return f
    a is assigned the sum of a and b
    if a is greater than or equal to 998244353, subtract 998244353 from a
end of the block
define the main function
    input n
    for i = 1 to n inclusive, input A[i]
    if A[1] doesn't equal -1
        Dp[1][1][A[1]] is set to 1
    else
        for i = 1 to 200 inclusive, set Dp[1][1][i] to 1
    assign 1 to cr
    for i = 2 to n inclusive
        assign 1 - cr to cr
        if A[i] doesn't equal -1
            for j = 1 to 200 inclusive
                if A[i] is less than j, call function f with arguments Dp[cr][0][A[i]], Dp[1 - cr][0][j]
                if a[i] is equal to j
                    call function f with arguments Dp[cr][0][A[i]], Dp[1 - cr][0][j]
                    call function f with arguments Dp[cr][0][A[i]], Dp[1 - cr][1][j]
                end of the block
                if A[i] is greater than j
                    call function f with arguments Dp[cr][1][A[i]], Dp[1 - cr][0][j]
                    call function f with arguments Dp[cr][1][A[i]], Dp[1 - cr][1][j]
                end of the block
                set Dp[1 - cr][1][j] and Dp[1 - cr][0][j] to 0
            end of the block
        else
            assign 0 to sum
            for j = 1 to 200 inclusive, call function f with arguments sum, Dp[1 - cr][0][j]
            assign 0 to sum1
            for j = 1 to 200 inclusive
                call function f with arguments Dp[cr][0][j], sum
                call function f with arguments Dp[cr][0][j], Dp[1 - cr][1][j]
                call function f with arguments sum, 998244353 - Dp[1 - cr][0][j]
                call function f with arguments Dp[cr][1][j], sum1
                call function f with arguments sum1, Dp[1 - cr][1][j]
                call function f with arguments sum1, Dp[1 - cr][0][j]
                set Dp[1 - cr][0][j] and Dp[1 - cr][1][j] to 0
            end of the block
        end of the block
    end of the block
    for i = 1 to 200 inclusive, call function f with arguments rez, Dp[cr][0][i]
    output rez
    return to indicate successful execution
end of the block

[CODE]:

int n, i, rez, sum, sum1, Dp[2][2][205], A[100005], cr, j;
void f(int &a, int b) {
    a = a + b;
    if (a >= 998244353) a -= 998244353;
}
int main() {
    cin >> n;
    for (i = 1; i <= n; i++) cin >> A[i];
    if (A[1] != -1)
        Dp[1][1][A[1]] = 1;
    else
        for (i = 1; i <= 200; i++) Dp[1][1][i] = 1;
    cr = 1;
    for (i = 2; i <= n; i++) {
        cr = 1 - cr;
        if (A[i] != -1) {
            for (j = 1; j <= 200; j++) {
                if (A[i] < j) f(Dp[cr][0][A[i]], Dp[1 - cr][0][j]);
                if (A[i] == j) {
                    f(Dp[cr][0][A[i]], Dp[1 - cr][0][j]);
                    f(Dp[cr][0][A[i]], Dp[1 - cr][1][j]);
                }
                if (A[i] > j) {
                    f(Dp[cr][1][A[i]], Dp[1 - cr][0][j]);
                    f(Dp[cr][1][A[i]], Dp[1 - cr][1][j]);
                }
                Dp[1 - cr][1][j] = Dp[1 - cr][0][j] = 0;
            }
        } else {
            sum = 0;
            for (j = 1; j <= 200; j++) f(sum, Dp[1 - cr][0][j]);
            sum1 = 0;
            for (j = 1; j <= 200; j++) {
                f(Dp[cr][0][j], sum);
                f(Dp[cr][0][j], Dp[1 - cr][1][j]);
                f(sum, 998244353 - Dp[1 - cr][0][j]);
                f(Dp[cr][1][j], sum1);
                f(sum1, Dp[1 - cr][1][j]);
                f(sum1, Dp[1 - cr][0][j]);
                Dp[1 - cr][0][j] = Dp[1 - cr][1][j] = 0;
            }
        }
    }
    for (i = 1; i <= 200; i++) f(rez, Dp[cr][0][i]);
    cout << rez << "\n";
    return 0;
}