Submission #948615

# Submission time Handle Problem Language Result Execution time Memory
948615 2024-03-18T08:48:33 Z Nhoksocqt1 Soccer Stadium (IOI23_soccer) C++17
65.5 / 100
1532 ms 595420 KB
#include<bits/stdc++.h>
using namespace std;

#define inf 0x3f3f3f3f
#define sz(x) int((x).size())
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> ii;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int Random(int l, int r) {
    return uniform_int_distribution<int>(l, r)(rng);
}

const int MAXN = 2003;
const int MAXM = 303;
const int lx[] = {-1, 0, 0, 1}, ly[] = {0, -1, 1, 0};

struct State {
    int x, y, t;

    State(int _x = 0, int _y = 0, int _t = 0) : x(_x), y(_y), t(_t) {};
};

ii range[MAXN], max_rec[MAXM][MAXM][MAXM];
int f[MAXN * MAXN], nxt[2][MAXN][MAXN], dp[2][MAXM][MAXM][MAXM];
int sum[MAXN][MAXN], up[MAXN][MAXN], down[MAXN][MAXN], nSize;
bool dx[MAXN][MAXN][4], tmp[MAXN][MAXN], isTree[MAXN][MAXN];

bool checkGrid2(void) {
    int minL(nSize), maxR(0);
    bool ok(0);
    for (int i = 1; i <= nSize; ++i) {
        range[i] = {0, 0};
        bool hasEmpty(0);
        for (int j = 1; j <= nSize; ++j) {
            if(hasEmpty && isTree[i][j - 1] && !isTree[i][j])
                return false;

            hasEmpty |= (!isTree[i][j]);
            if(!isTree[i][j]) {
                range[i].se = j;
                if(!range[i].fi)
                    range[i].fi = j;
            }
        }

        if(ok && range[i].fi > 0 && range[i - 1].fi == 0)
            return false;

        ok |= (range[i].fi > 0);
        if(range[i].fi > 0)
            minL = min(minL, range[i].fi);

        maxR = max(maxR, range[i].se);
    }

    int upL(-1), upR(-1), downL(-1), downR(-1);
    int leftL(-1), leftR(-1), rightL(-1), rightR(-1);
    bool descL(0), descR(0);
    for (int i = 1; i <= nSize; ++i) {
        if(range[i].fi == 0)
            continue;

        if(i > 2 && descL && range[i - 1].fi > range[i].fi)
            return false;

        if(i > 2 && descR && range[i - 1].se < range[i].se)
            return false;

        if(i > 1 && range[i - 1].fi > 0 && range[i - 1].fi < range[i].fi)
            descL = 1;

        if(i > 1 && range[i - 1].se > 0 && range[i - 1].se > range[i].se)
            descR = 1;

        if(upL < 0)
            upL = range[i].fi, upR = range[i].se;

        downL = range[i].fi, downR = range[i].se;
        if(range[i].fi == minL) {
            leftR = i;
            if(leftL < 0)
                leftL = i;
        }

        if(range[i].se == maxR) {
            rightR = i;
            if(rightL < 0)
                rightL = i;
        }
    }

    for (int i = 1; i <= nSize; ++i) {
        if(range[i].fi <= 0)
            continue;

        int nowL = range[i].fi, nowR = range[i].se;
        if(!(nowL <= upL && upR <= nowR || upL <= nowL && nowR <= upR) || !(nowL <= downL && downR <= nowR || downL <= nowL && nowR <= downR))
            return false;
    }

    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j) {
            if(!isTree[j][i]) {
                int k(j);
                while(k <= nSize && !isTree[k][i])
                    ++k;

                --k;
                if(!(j <= leftL && leftR <= k || leftL <= j && k <= leftR) || !(j <= rightL && rightR <= k || rightL <= j && k <= rightR))
                    return false;

                break;
            }
        }
    }

    return true;
}

int calc(int i, int j) {
    return (i - 1 + j - 1) * nSize - (i - 1) * (j - 1);
}

int sub1(void) {
    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j) {
            if(isTree[i][j]) {
                return max({calc(i, j), calc(nSize - i + 1, j), calc(i, nSize - j + 1), calc(nSize - i + 1, nSize - j + 1)});
            }
        }
    }

    abort();
}

int sub2(void) {
    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j)
            tmp[i][j] = isTree[i][j];
    }

    int res(0);
    for (int mask = 0; mask < (1 << (nSize * nSize)); ++mask) {
        if(__builtin_popcount(mask) <= res)
            continue;

        bool check(1);
        for (int i = 1; i <= nSize; ++i) {
            for (int j = 1; j <= nSize; ++j) {
                if((mask >> ((i - 1) * nSize + j - 1) & 1) && isTree[i][j])
                    check = 0;

                isTree[i][j] = !(mask >> ((i - 1) * nSize + j - 1) & 1);
            }
        }

        if(check && checkGrid2())
            res = __builtin_popcount(mask);

        for (int i = 1; i <= nSize; ++i) {
            for (int j = 1; j <= nSize; ++j)
                isTree[i][j] = tmp[i][j];
        }
    }

    return res;
}

inline int getSum(int x, int y, int u, int v) {
    return sum[u][v] - sum[u][y - 1] - sum[x - 1][v] + sum[x - 1][y - 1];
}

int sub4(void) {
    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j)
            sum[i][j] = sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + isTree[i][j];
    }

    for (int l = 1; l <= nSize; ++l) {
        for (int r = l; r <= nSize; ++r) {
            for (int i = 1; i <= nSize; ++i) {
                dp[0][i][l][r] = dp[1][i][l][r] = 0;
            }
        }
    }

    for (int i = 1; i <= nSize; ++i) {
        for (int l = 1; l <= nSize; ++l) {
            for (int r = l; r <= nSize; ++r) {
                if(isTree[i][r])
                    break;

                dp[1][i][l][r] = r - l + 1;
            }
        }
    }

    int res(0);
    for (int len = 1; len <= nSize; ++len) {
        int pre(len & 1), cur(!pre);
        for (int i = 1; i + len - 1 <= nSize; ++i) {
            int j(i + len - 1);
            for (int l = 1; l <= nSize; ++l) {
                for (int r = nSize; r >= l; --r) {
                    if(!dp[pre][i][l][r])
                        continue;

                    if(i > 1 && getSum(i - 1, l, i - 1, r) == 0)
                        dp[cur][i - 1][l][r] = max(dp[cur][i - 1][l][r], dp[pre][i][l][r] + r - l + 1);

                    if(j < nSize && getSum(j + 1, l, j + 1, r) == 0)
                        dp[cur][i][l][r] = max(dp[cur][i][l][r], dp[pre][i][l][r] + r - l + 1);

                    if(l < r) {
                        dp[pre][i][l + 1][r] = max(dp[pre][i][l + 1][r], dp[pre][i][l][r]);
                        dp[pre][i][l][r - 1] = max(dp[pre][i][l][r - 1], dp[pre][i][l][r]);
                    }

                    res = max(res, dp[pre][i][l][r]);
                    dp[pre][i][l][r] = 0;
                }
            }
        }
    }

    return res;
}

int sub5(void) {
    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j)
            sum[i][j] = sum[i - 1][j] + sum[i][j - 1] - sum[i - 1][j - 1] + isTree[i][j];
    }

    for (int l = 1; l <= nSize; ++l) {
        for (int r = l; r <= nSize; ++r) {
            int j(1);
            for (int i = 1; i <= nSize; ++i) {
                j = max(j, i);
                while(j < nSize && getSum(i, l, j + 1, r) == 0)
                    ++j;

                max_rec[i][l][r].se = j;
            }

            j = nSize;
            for (int i = nSize; i > 0; --i) {
                j = min(j, i);
                while(j > 1 && getSum(j - 1, l, i, r) == 0)
                    --j;

                max_rec[i][l][r].fi = j;
            }
        }
    }

    for (int i = 1; i <= nSize; ++i) {
        for (int l = 1; l <= nSize; ++l) {
            for (int r = l; r <= nSize; ++r) {
                if(max_rec[i][l][r].fi == i && getSum(i, l, i, r) == 0) {
                    dp[0][i][l][r] = (max_rec[i][l][r].se - max_rec[i][l][r].fi + 1) * (r - l + 1);
                } else {
                    dp[0][i][l][r] = 0;
                }
            }
        }
    }

    int res(0);
    for (int i = nSize; i > 0; --i) {
        for (int l = 1; l <= nSize; ++l) {
            for (int r = nSize; r >= l; --r) {
                if(!dp[0][i][l][r])
                    continue;

                int recSize = max_rec[i][l][r].se - max_rec[i][l][r].fi;
                if(l < r) {
                    ii new_rec = max_rec[i][l + 1][r];
                    dp[0][i][l + 1][r] = max(dp[0][i][l + 1][r], dp[0][i][l][r] + (new_rec.se - new_rec.fi - recSize) * (r - l));

                    new_rec = max_rec[i][l][r - 1];
                    dp[0][i][l][r - 1] = max(dp[0][i][l][r - 1], dp[0][i][l][r] + (new_rec.se - new_rec.fi - recSize) * (r - l));
                }

                res = max(res, dp[0][i][l][r]);
                dp[0][i][l][r] = 0;
            }
        }
    }

    return res;
}

template<int LOG = 12> struct SparseTable {
    array<array<int, LOG>, MAXN> P;

    SparseTable() {};

    SparseTable(int N, int C[]) {
        for (int i = 1; i <= N; ++i)
            P[i][0] = C[i];

        for (int j = 1; (1 << j) <= N; ++j) {
            for (int i = 1; i + (1 << j) - 1 <= N; ++i)
                P[i][j] = min(P[i][j - 1], P[i + (1 << (j - 1))][j - 1]);
        }
    }

    int query(int l, int r) {
        int log = 31 - __builtin_clz(r - l + 1);
        return min(P[l][log], P[r - (1 << log) + 1][log]);
    }

};

SparseTable<> up_rmq[MAXN], down_rmq[MAXN];

vector<array<int, 4>> rects;
map<array<int, 4>, int> idRec;

void gen_rectangle(void) {
    for (int i = 1; i <= nSize; ++i) {
        stack<array<int, 4>> st;
        for (int j = 1; j <= nSize + 1; ++j) {
            int cur_h = (j <= nSize) ? up[i][j] : 0;
            int cur_start = j, cur_w = 1, cur_based = (i == nSize || isTree[i + 1][j]);

            while(sz(st) && st.top()[2] >= cur_h) {
                array<int, 4> p(st.top()); st.pop();
                int start(p[0]), w(p[1]), h(p[2]), based(p[3]);

                if(based && h > cur_h) {
                    rects.push_back({i - h + 1, start, i, start + w - 1});
                    idRec[rects.back()] = sz(rects) - 1;
                }

                cur_based |= based;
                cur_start = start;
                cur_w += w;
            }

            st.push({cur_start, cur_w, cur_h, cur_based});
        }
    }
}

void init(void) {
    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j) {
            up[i][j] = (isTree[i][j]) ? 0 : 1 + up[i - 1][j];
            down[nSize - i + 1][j] = (isTree[nSize - i + 1][j]) ? 0 : 1 + down[nSize - i + 2][j];
        }

        nxt[0][i][nSize] = nxt[1][i][nSize] = nSize + 1;
        for (int j = nSize - 1; j > 0; --j) {
            int c(isTree[i][j + 1]);
            nxt[c][i][j] = j + 1;
            nxt[1 - c][i][j] = nxt[1 - c][i][j + 1];
        }
    }

    for (int i = 1; i <= nSize; ++i) {
        up_rmq[i] = SparseTable<>(nSize, up[i]);
        down_rmq[i] = SparseTable<>(nSize, down[i]);
    }

    gen_rectangle();
}

int solve(int id_rec) {
    int &ans(f[id_rec]);
    if(ans != -1)
        return ans;

    int a = rects[id_rec][0], b = rects[id_rec][1];
    int c = rects[id_rec][2], d = rects[id_rec][3];
    int area = (c - a + 1) * (d - b + 1);

    ans = area;
    if(a > 1) {
        int start = (!isTree[a - 1][b]) ? b : nxt[0][a - 1][b];
        for (int l = start; l <= d; ) {
            int r = min(nSize, nxt[1][a - 1][l] - 1);
            if(l == b && r == d)
                break;

            int u = a - up_rmq[a].query(l, r) + 1;
            int d = c + down_rmq[c].query(l, r) - 1;

            if(idRec.find({u, l, d, r}) != idRec.end()) {
                int new_id_rec = idRec[{u, l, d, r}];
                ans = max(ans, area + solve(new_id_rec) - (c - a + 1) * (r - l + 1));
            }

            l = nxt[0][a - 1][r];
        }
    }

    if(c < nSize) {
        int start = (!isTree[c + 1][b]) ? b : nxt[0][c + 1][b];
        for (int l = start; l <= d; ) {
            int r = min(nSize, nxt[1][c + 1][l] - 1);
            if(l == b && r == d)
                break;

            int u = a - up_rmq[a].query(l, r) + 1;
            int d = c + down_rmq[c].query(l, r) - 1;

            if(idRec.find({u, l, d, r}) != idRec.end()) {
                int new_id_rec = idRec[{u, l, d, r}];
                ans = max(ans, area + solve(new_id_rec) - (c - a + 1) * (r - l + 1));
            }

            l = nxt[0][c + 1][r];
        }
    }

    return ans;
}

int magicFunc(void) {
    init();
    for (int i = 0; i < sz(rects); ++i)
        f[i] = -1;

    int res(0);
    for (int i = 0; i < sz(rects); ++i)
        res = max(res, solve(i));

    return res;
}

int biggest_stadium(int n, vector<vector<int>> F) {
    nSize = n;

    int cntTree(0);
    for (int i = 1; i <= nSize; ++i) {
        for (int j = 1; j <= nSize; ++j) {
            isTree[i][j] = (F[i - 1][j - 1]);
            cntTree += isTree[i][j];
        }
    }

    if(cntTree == 1)
        return sub1();

    if(nSize <= 3)
        return sub2();

    if(cntTree == 0 || checkGrid2())
        return nSize * nSize - cntTree;

    if(nSize <= 30)
        return sub4();

    if(nSize <= 300)
        return sub5();

    return magicFunc();
}

#ifdef Nhoksocqt1

int main(void) {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

    #define TASK "soccer"
    if(fopen(TASK".inp", "r")) {
        freopen(TASK".inp", "r", stdin);
        freopen(TASK".out", "w", stdout);
    }

    vector<vector<int>> F;
    int n;
    cin >> n;

    F.resize(n);
    for (int i = 0; i < n; ++i) {
        F[i].resize(n);
        for (int j = 0; j < n; ++j) {
            cin >> F[i][j];
            //F[i][j] = min(1, max(0, Random(-4, 1))); cout << F[i][j] << " \n"[j + 1 == n];
        }
    }

    int ans = biggest_stadium(n, F);
    cout << "ANSWER: " << ans << '\n';

    return 0;
}

#endif // Nhoksocqt1

Compilation message

soccer.cpp: In function 'bool checkGrid2()':
soccer.cpp:100:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  100 |         if(!(nowL <= upL && upR <= nowR || upL <= nowL && nowR <= upR) || !(nowL <= downL && downR <= nowR || downL <= nowL && nowR <= downR))
      |              ~~~~~~~~~~~~^~~~~~~~~~~~~~
soccer.cpp:100:91: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  100 |         if(!(nowL <= upL && upR <= nowR || upL <= nowL && nowR <= upR) || !(nowL <= downL && downR <= nowR || downL <= nowL && nowR <= downR))
      |                                                                             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
soccer.cpp:112:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  112 |                 if(!(j <= leftL && leftR <= k || leftL <= j && k <= leftR) || !(j <= rightL && rightR <= k || rightL <= j && k <= rightR))
      |                      ~~~~~~~~~~~^~~~~~~~~~~~~
soccer.cpp:112:93: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  112 |                 if(!(j <= leftL && leftR <= k || leftL <= j && k <= leftR) || !(j <= rightL && rightR <= k || rightL <= j && k <= rightR))
      |                                                                                 ~~~~~~~~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8540 KB ok
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4444 KB ok
2 Correct 1 ms 4444 KB ok
3 Correct 1 ms 4444 KB ok
4 Correct 1 ms 4696 KB ok
5 Correct 3 ms 6492 KB ok
6 Correct 1 ms 4444 KB ok
7 Correct 1 ms 4444 KB ok
8 Correct 17 ms 8984 KB ok
9 Correct 257 ms 46292 KB ok
# Verdict Execution time Memory Grader output
1 Correct 1 ms 4444 KB ok
2 Correct 1 ms 4444 KB ok
3 Correct 1 ms 6492 KB ok
4 Correct 1 ms 6492 KB ok
5 Correct 1 ms 6492 KB ok
6 Correct 1 ms 6592 KB ok
7 Correct 1 ms 6492 KB ok
8 Correct 2 ms 6492 KB ok
9 Correct 2 ms 6488 KB ok
10 Correct 1 ms 6488 KB ok
11 Correct 1 ms 6488 KB ok
12 Correct 1 ms 6492 KB ok
13 Correct 1 ms 6492 KB ok
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8540 KB ok
2 Correct 1 ms 4444 KB ok
3 Correct 1 ms 4444 KB ok
4 Correct 1 ms 6492 KB ok
5 Correct 1 ms 6492 KB ok
6 Correct 1 ms 6492 KB ok
7 Correct 1 ms 6592 KB ok
8 Correct 1 ms 6492 KB ok
9 Correct 2 ms 6492 KB ok
10 Correct 2 ms 6488 KB ok
11 Correct 1 ms 6488 KB ok
12 Correct 1 ms 6488 KB ok
13 Correct 1 ms 6492 KB ok
14 Correct 1 ms 6492 KB ok
15 Correct 2 ms 12636 KB ok
16 Correct 2 ms 12632 KB ok
17 Correct 2 ms 12632 KB ok
18 Correct 2 ms 12636 KB ok
19 Correct 2 ms 12636 KB ok
20 Correct 1 ms 4444 KB ok
21 Correct 1 ms 4440 KB ok
22 Correct 3 ms 12636 KB ok
23 Correct 2 ms 12636 KB ok
24 Correct 2 ms 12636 KB ok
25 Correct 2 ms 12636 KB ok
26 Correct 2 ms 12636 KB ok
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8540 KB ok
2 Correct 1 ms 4444 KB ok
3 Correct 1 ms 4444 KB ok
4 Correct 1 ms 4444 KB ok
5 Correct 1 ms 4696 KB ok
6 Correct 1 ms 6492 KB ok
7 Correct 1 ms 6492 KB ok
8 Correct 1 ms 6492 KB ok
9 Correct 1 ms 6592 KB ok
10 Correct 1 ms 6492 KB ok
11 Correct 2 ms 6492 KB ok
12 Correct 2 ms 6488 KB ok
13 Correct 1 ms 6488 KB ok
14 Correct 1 ms 6488 KB ok
15 Correct 1 ms 6492 KB ok
16 Correct 1 ms 6492 KB ok
17 Correct 2 ms 12636 KB ok
18 Correct 2 ms 12632 KB ok
19 Correct 2 ms 12632 KB ok
20 Correct 2 ms 12636 KB ok
21 Correct 2 ms 12636 KB ok
22 Correct 1 ms 4444 KB ok
23 Correct 1 ms 4440 KB ok
24 Correct 3 ms 12636 KB ok
25 Correct 2 ms 12636 KB ok
26 Correct 2 ms 12636 KB ok
27 Correct 2 ms 12636 KB ok
28 Correct 2 ms 12636 KB ok
29 Correct 2 ms 12636 KB ok
30 Correct 7 ms 29292 KB ok
31 Correct 4 ms 29276 KB ok
32 Correct 4 ms 29276 KB ok
33 Correct 4 ms 29272 KB ok
34 Correct 1 ms 4440 KB ok
35 Correct 1 ms 4444 KB ok
36 Correct 4 ms 29276 KB ok
37 Correct 4 ms 29276 KB ok
38 Correct 4 ms 29272 KB ok
39 Correct 5 ms 29276 KB ok
40 Correct 4 ms 29308 KB ok
41 Correct 4 ms 29276 KB ok
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8540 KB ok
2 Correct 1 ms 4444 KB ok
3 Correct 1 ms 4444 KB ok
4 Correct 1 ms 4444 KB ok
5 Correct 1 ms 4696 KB ok
6 Correct 1 ms 6492 KB ok
7 Correct 1 ms 6492 KB ok
8 Correct 1 ms 6492 KB ok
9 Correct 1 ms 6592 KB ok
10 Correct 1 ms 6492 KB ok
11 Correct 2 ms 6492 KB ok
12 Correct 2 ms 6488 KB ok
13 Correct 1 ms 6488 KB ok
14 Correct 1 ms 6488 KB ok
15 Correct 1 ms 6492 KB ok
16 Correct 1 ms 6492 KB ok
17 Correct 2 ms 12636 KB ok
18 Correct 2 ms 12632 KB ok
19 Correct 2 ms 12632 KB ok
20 Correct 2 ms 12636 KB ok
21 Correct 2 ms 12636 KB ok
22 Correct 1 ms 4444 KB ok
23 Correct 1 ms 4440 KB ok
24 Correct 3 ms 12636 KB ok
25 Correct 2 ms 12636 KB ok
26 Correct 2 ms 12636 KB ok
27 Correct 2 ms 12636 KB ok
28 Correct 2 ms 12636 KB ok
29 Correct 2 ms 12636 KB ok
30 Correct 7 ms 29292 KB ok
31 Correct 4 ms 29276 KB ok
32 Correct 4 ms 29276 KB ok
33 Correct 4 ms 29272 KB ok
34 Correct 1 ms 4440 KB ok
35 Correct 1 ms 4444 KB ok
36 Correct 4 ms 29276 KB ok
37 Correct 4 ms 29276 KB ok
38 Correct 4 ms 29272 KB ok
39 Correct 5 ms 29276 KB ok
40 Correct 4 ms 29308 KB ok
41 Correct 4 ms 29276 KB ok
42 Partially correct 94 ms 128952 KB partial
43 Partially correct 73 ms 130052 KB partial
44 Partially correct 46 ms 126628 KB partial
45 Partially correct 43 ms 126548 KB partial
46 Partially correct 58 ms 127944 KB partial
47 Partially correct 39 ms 126032 KB partial
48 Correct 18 ms 9016 KB ok
49 Partially correct 38 ms 128080 KB partial
50 Partially correct 52 ms 127568 KB partial
51 Partially correct 46 ms 129620 KB partial
52 Partially correct 44 ms 128136 KB partial
53 Partially correct 37 ms 128080 KB partial
54 Partially correct 36 ms 128084 KB partial
55 Partially correct 38 ms 128084 KB partial
56 Correct 39 ms 126620 KB ok
57 Correct 68 ms 130896 KB ok
58 Correct 80 ms 131776 KB ok
59 Correct 80 ms 132288 KB ok
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8540 KB ok
2 Correct 1 ms 4444 KB ok
3 Correct 1 ms 4444 KB ok
4 Correct 1 ms 4444 KB ok
5 Correct 1 ms 4696 KB ok
6 Correct 3 ms 6492 KB ok
7 Correct 1 ms 4444 KB ok
8 Correct 1 ms 4444 KB ok
9 Correct 17 ms 8984 KB ok
10 Correct 257 ms 46292 KB ok
11 Correct 1 ms 6492 KB ok
12 Correct 1 ms 6492 KB ok
13 Correct 1 ms 6492 KB ok
14 Correct 1 ms 6592 KB ok
15 Correct 1 ms 6492 KB ok
16 Correct 2 ms 6492 KB ok
17 Correct 2 ms 6488 KB ok
18 Correct 1 ms 6488 KB ok
19 Correct 1 ms 6488 KB ok
20 Correct 1 ms 6492 KB ok
21 Correct 1 ms 6492 KB ok
22 Correct 2 ms 12636 KB ok
23 Correct 2 ms 12632 KB ok
24 Correct 2 ms 12632 KB ok
25 Correct 2 ms 12636 KB ok
26 Correct 2 ms 12636 KB ok
27 Correct 1 ms 4444 KB ok
28 Correct 1 ms 4440 KB ok
29 Correct 3 ms 12636 KB ok
30 Correct 2 ms 12636 KB ok
31 Correct 2 ms 12636 KB ok
32 Correct 2 ms 12636 KB ok
33 Correct 2 ms 12636 KB ok
34 Correct 2 ms 12636 KB ok
35 Correct 7 ms 29292 KB ok
36 Correct 4 ms 29276 KB ok
37 Correct 4 ms 29276 KB ok
38 Correct 4 ms 29272 KB ok
39 Correct 1 ms 4440 KB ok
40 Correct 1 ms 4444 KB ok
41 Correct 4 ms 29276 KB ok
42 Correct 4 ms 29276 KB ok
43 Correct 4 ms 29272 KB ok
44 Correct 5 ms 29276 KB ok
45 Correct 4 ms 29308 KB ok
46 Correct 4 ms 29276 KB ok
47 Partially correct 94 ms 128952 KB partial
48 Partially correct 73 ms 130052 KB partial
49 Partially correct 46 ms 126628 KB partial
50 Partially correct 43 ms 126548 KB partial
51 Partially correct 58 ms 127944 KB partial
52 Partially correct 39 ms 126032 KB partial
53 Correct 18 ms 9016 KB ok
54 Partially correct 38 ms 128080 KB partial
55 Partially correct 52 ms 127568 KB partial
56 Partially correct 46 ms 129620 KB partial
57 Partially correct 44 ms 128136 KB partial
58 Partially correct 37 ms 128080 KB partial
59 Partially correct 36 ms 128084 KB partial
60 Partially correct 38 ms 128084 KB partial
61 Correct 39 ms 126620 KB ok
62 Correct 68 ms 130896 KB ok
63 Correct 80 ms 131776 KB ok
64 Correct 80 ms 132288 KB ok
65 Partially correct 1135 ms 536492 KB partial
66 Correct 777 ms 545356 KB ok
67 Correct 557 ms 513508 KB ok
68 Partially correct 526 ms 487372 KB partial
69 Partially correct 647 ms 499132 KB partial
70 Partially correct 753 ms 505672 KB partial
71 Partially correct 499 ms 486844 KB partial
72 Partially correct 458 ms 485464 KB partial
73 Correct 261 ms 46240 KB ok
74 Correct 266 ms 46356 KB ok
75 Partially correct 490 ms 485780 KB partial
76 Partially correct 763 ms 485832 KB partial
77 Partially correct 754 ms 485644 KB partial
78 Partially correct 547 ms 498164 KB partial
79 Partially correct 515 ms 490588 KB partial
80 Partially correct 548 ms 489020 KB partial
81 Partially correct 533 ms 488644 KB partial
82 Partially correct 535 ms 491632 KB partial
83 Partially correct 645 ms 510296 KB partial
84 Partially correct 475 ms 485624 KB partial
85 Partially correct 511 ms 485736 KB partial
86 Partially correct 481 ms 485784 KB partial
87 Partially correct 476 ms 487368 KB partial
88 Correct 487 ms 485660 KB ok
89 Partially correct 493 ms 485840 KB partial
90 Partially correct 498 ms 485960 KB partial
91 Partially correct 499 ms 485720 KB partial
92 Partially correct 563 ms 500628 KB partial
93 Partially correct 572 ms 502516 KB partial
94 Correct 507 ms 491860 KB ok
95 Correct 545 ms 488652 KB ok
96 Correct 531 ms 487576 KB ok
97 Partially correct 491 ms 487184 KB partial
98 Correct 472 ms 486508 KB ok
99 Partially correct 593 ms 500888 KB partial
100 Correct 1082 ms 568672 KB ok
101 Partially correct 483 ms 486992 KB partial
102 Partially correct 483 ms 487096 KB partial
103 Correct 1216 ms 585388 KB ok
104 Partially correct 471 ms 486992 KB partial
105 Partially correct 465 ms 486992 KB partial
106 Correct 1482 ms 595420 KB ok
107 Correct 1532 ms 594624 KB ok
108 Partially correct 516 ms 491984 KB partial
109 Correct 513 ms 484100 KB ok