QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#292411#7120. SoccerGoldenglow142736 532ms71648kbC++147.0kb2023-12-28 04:11:302024-04-28 08:03:22

Judging History

你现在查看的是最新测评结果

  • [2024-04-28 08:03:22]
  • 管理员手动重测本题所有提交记录
  • 测评结果:36
  • 用时:532ms
  • 内存:71648kb
  • [2023-12-28 04:11:31]
  • 评测
  • 测评结果:36
  • 用时:517ms
  • 内存:72000kb
  • [2023-12-28 04:11:30]
  • 提交

answer

/*
ID: Victor Chen [mail_vi1]
PROG: Soccer Stadium
LANG: C++
*/

#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <cassert>

using namespace std;

const int Maxn = 2000;

typedef long long ll;

map<ll, bool> hash_mp;
map<ll, int> dp;

int n, ans;
bool mp[Maxn+10][Maxn+10];
int pre[Maxn+10][Maxn+10];

// int dp[Maxn+10][Maxn+10];

struct Rectangle
{
    int x, y; // The id signifies the rectangle.
    int l, r; // The left bound and the right bound.
    int u, d; // The upper bound and the lower bound.

    Rectangle(){}
    Rectangle(int x1, int y1, int x2, int y2)
    {
        u = x1; d = x2;
        l = y1; r = y2;
    }

    int find_area()
    {
        return (r-l+1) * (d-u+1);
    }

    ll hash()
    {
        return (((((ll)l*Maxn)+r)*Maxn)+u)*Maxn+d;
    }

    bool exist()
    {
        return l != 0;
    }

    void print()
    {
        printf("%d %d %d %d\n", u, l, d, r);
    }
};

int cnt;
Rectangle ord[Maxn*Maxn];

bool cmp(Rectangle x, Rectangle y)
{
    if(x.d-x.u != y.d-y.u)
        return (x.d-x.u) < (y.d-y.u);
    else
        return (x.r-x.l) > (y.r-y.l);
}

Rectangle merge(Rectangle x, Rectangle y)
{
    return Rectangle(max(x.u, y.u), max(x.l, y.l), min(x.d, y.d), min(x.r, y.r));
}

int find_sum(int x1, int y1, int x2, int y2)
{
    return pre[x2][y2] - pre[x2][y1-1] - pre[x1-1][y2] + pre[x1-1][y1-1]; 
}

Rectangle find_rect(int x, int y, int k)
{
    Rectangle ret = Rectangle();

    ret.u = x, ret.d = k;

    ret.l = ret.r = y;
    int l = 1, r = y, mid;
    while(l <= r)
    {
        mid = (l+r)/2;
        if(find_sum(x, mid, k, y) == 0)
        {
            r = mid - 1;
            ret.l = mid;
        }
        else
            l = mid + 1;
    }

    l = y, r = n;
    while(l <= r)
    {
        mid = (l+r)/2;
        if(find_sum(x, y, k, mid) == 0)
        {
            l = mid + 1;
            ret.r = mid;
        }
        else
            r = mid - 1;
    }

    return ret;
}

Rectangle find_up_rect(int x, int y, int k)
{
    Rectangle ret;

    ret.l = x, ret.r = y, ret.u = ret.d = k;

    int l = 1, r = k, mid;
    while(l <= r)
    {
        mid = (l+r)/2;
        if(find_sum(mid, x, k, y) == 0)
        {
            r = mid - 1;
            ret.u = mid;
        }
        else
            l = mid + 1;
    }

    return ret;
}
Rectangle find_down_rect(int x, int y, int k)
{
    Rectangle ret;

    ret.l = x, ret.r = y, ret.u = ret.d = k;

    int l = k, r = n, mid;
    while(l <= r)
    {
        mid = (l+r)/2;
        if(find_sum(k, x, mid, y) == 0)
        {
            l = mid + 1;
            ret.d = mid;
        }
        else
            r = mid - 1;
    }

    return ret;
}

int tp;
int nxt[Maxn+10][Maxn+10];

int biggest_stadium(int N, vector<vector<int>> F)
{
    n = N;
    for(int i=1; i<=n; i++)
        for(int j=1; j<=n; j++)
        {
            mp[i][j] = F[i-1][j-1];
            pre[i][j] = pre[i-1][j] + pre[i][j-1] - pre[i-1][j-1] + mp[i][j];
        }

    for(int i=1; i<=n; i++)
    {
        int lst0 = n+1, lst1 = n+1;
        for(int j=n; j>=1; j--)
            if(mp[i][j] == 0)
            {
                nxt[i][j] = lst1;
                lst0 = j;
            }
            else
            {
                nxt[i][j] = lst0;
                lst1 = j;
            }
    }

    // The columns.
    for(int i=1; i<=n; i++)
    {
        tp = 0;
        for(int j=1; j<=n; j++)
            if(mp[j][i] == 1)
                tp = j;
            else
            {
                Rectangle k = find_rect(tp+1, i, j);
                if(k.exist() && hash_mp[k.hash()] == false)
                {
                    // if(k.d != n && find_sum(k.d+1, k.l, k.d+1, k.r) == 0)
                    //     continue;
                    
                    ord[++cnt] = k;
                    hash_mp[k.hash()] = true;
                }
            }
    }

    // find_rect(1, 2, 4).print();
    
    // for(int i=1; i<=n; i++)
    //     for(int j=1; j<=n; j++)
    //         rec[i][j].print();

    sort(ord+1, ord+cnt+1, cmp);

    // for(int i=1; i<=cnt; i++)
    //     ord[i].print();

    int trans = 0;
    for(int i=1; i<=cnt; i++)
    {
        dp[ord[i].hash()] = max(dp[ord[i].hash()], ord[i].find_area());
        if(ord[i].u != 1)
        {
            int r = ord[i].u-1;
            int bg, ed;
            if(mp[r][ord[i].l] == 0)
                bg = ord[i].l;
            else
                bg = nxt[r][ord[i].l];

            ed = nxt[r][bg] - 1;
                
            if(ed > ord[i].r) ed = ord[i].r;

            if(bg <= ord[i].r)
            {
                while(ed <= ord[i].r)
                {
                    Rectangle k = find_up_rect(bg, ed, ord[i].d);
                    dp[k.hash()] = max(dp[k.hash()], dp[ord[i].hash()] + k.find_area() - merge(ord[i], k).find_area());

                    trans++;
                    assert(trans <= n*n);

                    if(ed == ord[i].r)
                        break;
                    
                    bg = nxt[r][ed+1];
                    ed = nxt[r][bg] - 1;

                    if(ed > ord[i].r) ed = ord[i].r;
                    if(bg > ord[i].r) break;
                }
            }
        }
        if(ord[i].d != n)
        {
            int r = ord[i].d+1;
            int bg, ed;
            if(mp[r][ord[i].l] == 0)
                bg = ord[i].l;
            else
                bg = nxt[r][ord[i].l];

            ed = nxt[r][bg] - 1;
            
            // printf("%d %d\n", bg, ed);
            
            if(ed > ord[i].r) ed = ord[i].r;

            if(bg <= ord[i].r)
            {
                while(ed <= ord[i].r)
                {
                    Rectangle k = find_down_rect(bg, ed, ord[i].u);
                    dp[k.hash()] = max(dp[k.hash()], dp[ord[i].hash()] + k.find_area() - merge(ord[i], k).find_area());

                    trans++;
                    assert(trans <= n*n);

                    if(ed == ord[i].r)
                        break;
                    
                    bg = nxt[r][ed+1];
                    ed = nxt[r][bg] - 1;

                    if(ed > ord[i].r) ed = ord[i].r;
                    if(bg > ord[i].r) break;
                }
            }
        }

        ans = max(ans, dp[ord[i].hash()]);
    }

    // printf("%d\n", dp[Rectangle(1, 1, 1, 3).hash()]);

    return ans;
}

// int N;
// vector<int> ept;
// vector<vector<int>> F;

// int main()
// {
//     freopen("read.in", "r", stdin);

//     scanf("%d", &N);
//     for(int i=0; i<N; i++)
//     {
//         F.push_back(ept);
//         for(int j=0; j<N; j++)
//         {
//             int x;
//             scanf("%d", &x);
//             F[i].push_back(x);
//         }
//     }

//     printf("%d\n", biggest_stadium(N, F));

//     return 0;
// }

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 1ms
memory: 8000kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
1
0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1

result:

ok ok

Test #2:

score: 6
Accepted
time: 1ms
memory: 8260kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 0
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #3:

score: 6
Accepted
time: 0ms
memory: 10868kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
100
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9850

result:

ok ok

Test #4:

score: 6
Accepted
time: 24ms
memory: 19652kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
236536

result:

ok ok

Test #5:

score: 6
Accepted
time: 532ms
memory: 71648kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
2000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
3786181

result:

ok ok

Test #6:

score: 6
Accepted
time: 1ms
memory: 8020kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
9
1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
80

result:

ok ok

Test #7:

score: 6
Accepted
time: 1ms
memory: 7992kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
10
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
99

result:

ok ok

Test #8:

score: 6
Accepted
time: 0ms
memory: 8204kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 0 0
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
8

result:

ok ok

Test #9:

score: 6
Accepted
time: 1ms
memory: 8004kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 0 0
1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
8

result:

ok ok

Subtask #2:

score: 8
Accepted

Test #10:

score: 8
Accepted
time: 0ms
memory: 10008kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 0
0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #11:

score: 8
Accepted
time: 1ms
memory: 7944kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 1 1
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #12:

score: 8
Accepted
time: 1ms
memory: 8000kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 0
1 1 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #13:

score: 8
Accepted
time: 1ms
memory: 7940kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
1 0 0
1 0 1
0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
4

result:

ok ok

Test #14:

score: 8
Accepted
time: 1ms
memory: 7924kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 0
1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Test #15:

score: 8
Accepted
time: 0ms
memory: 7912kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
0 0 1
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
7

result:

ok ok

Test #16:

score: 8
Accepted
time: 0ms
memory: 7908kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
0 0 0
0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9

result:

ok ok

Test #17:

score: 8
Accepted
time: 1ms
memory: 7944kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 0
1 0 0
0 1 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Test #18:

score: 8
Accepted
time: 0ms
memory: 7968kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
1 1 1
0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
2

result:

ok ok

Test #19:

score: 8
Accepted
time: 1ms
memory: 7940kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
0 0 1
1 0 1
0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
3

result:

ok ok

Test #20:

score: 8
Accepted
time: 0ms
memory: 7972kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
3
1 0 1
0 0 0
1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Subtask #3:

score: 22
Accepted

Dependency #2:

100%
Accepted

Test #21:

score: 22
Accepted
time: 1ms
memory: 7916kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
1 0 0 0 0 1 0
0 0 0 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
43

result:

ok ok

Test #22:

score: 22
Accepted
time: 1ms
memory: 7984kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 0 0
1 0 0 0 0 1 0
0 0 0 0 1 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
35

result:

ok ok

Test #23:

score: 22
Accepted
time: 0ms
memory: 8008kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 1 0 0 0
0 0 0 0 0 1 0
0 1 0 0 0 0 0
0 0 0 0 1 0 0
0 0 0 0 1 0 0
1 0 0 0 0 1 0
0 1 0 0 1 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
18

result:

ok ok

Test #24:

score: 22
Accepted
time: 1ms
memory: 7964kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 1 1 0 1 0
1 1 0 0 0 1 0
0 1 0 0 0 0 1
0 0 0 1 1 1 0
0 0 1 0 1 0 0
1 0 1 0 0 1 1
0 1 1 0 1 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
8

result:

ok ok

Test #25:

score: 22
Accepted
time: 1ms
memory: 8276kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 1 1 0 0 1
1 1 1 1 1 1 1
0 0 0 1 1 1 1
1 1 1 1 0 1 1
1 1 1 1 1 0 1
1 0 0 0 0 0 0
1 0 0 1 0 0 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
9

result:

ok ok

Test #26:

score: 22
Accepted
time: 0ms
memory: 7940kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 0 1 1
1 1 1 0 0 0 1
1 1 1 1 0 1 1
1 1 1 1 0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
6

result:

ok ok

Test #27:

score: 22
Accepted
time: 1ms
memory: 7972kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 0 1 1
1 1 1 1 0 1 1
1 1 1 1 0 1 1
1 1 0 0 0 1 1
1 0 0 0 0 1 1
1 1 1 1 0 1 1
1 1 1 1 0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
12

result:

ok ok

Test #28:

score: 22
Accepted
time: 1ms
memory: 8264kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 0 1 1 1 1 1
0 0 1 1 1 1 1
0 0 0 0 1 1 1
0 0 0 1 1 1 1
1 0 0 1 1 1 1
1 0 1 1 1 1 1
1 0 1 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
13

result:

ok ok

Test #29:

score: 22
Accepted
time: 0ms
memory: 10020kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 0 1 1 1 1
1 0 0 1 1 1 1
1 0 0 0 1 1 1
0 0 0 0 1 1 1
0 0 0 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
12

result:

ok ok

Test #30:

score: 22
Accepted
time: 1ms
memory: 8008kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 0 0 1 1 1
0 0 0 0 0 1 1
1 0 0 1 1 1 1
1 0 0 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
10

result:

ok ok

Test #31:

score: 22
Accepted
time: 1ms
memory: 7960kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 0 1 1 1
1 1 1 0 1 1 1
1 1 0 0 0 1 1
1 0 0 0 0 0 0
0 0 0 0 0 0 0
1 1 1 0 0 0 1
1 1 1 1 1 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
20

result:

ok ok

Test #32:

score: 22
Accepted
time: 0ms
memory: 8260kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
1 0 0 0 0 0 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
21

result:

ok ok

Subtask #4:

score: 0
Runtime Error

Dependency #3:

100%
Accepted

Test #33:

score: 18
Accepted
time: 1ms
memory: 7964kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
7
1 1 1 1 1 1 1
1 0 0 0 1 1 1
0 0 0 0 0 0 0
1 0 0 0 0 0 0
1 1 0 0 0 0 0
1 1 0 0 0 1 1
1 1 1 0 0 1 1

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
24

result:

ok ok

Test #34:

score: 0
Runtime Error

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0
0 0 0 0 1 1 0 0 0 0 0 0 ...

output:


result:


Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%