QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#292496#7120. Soccerfeiz70 2344ms649816kbC++147.5kb2023-12-28 06:14:562023-12-28 06:14:56

Judging History

你现在查看的是测评时间为 2023-12-28 06:14:56 的历史记录

  • [2024-04-28 08:07:22]
  • 管理员手动重测本题所有提交记录
  • 测评结果:70
  • 用时:2359ms
  • 内存:650168kb
  • [2023-12-28 06:14:56]
  • 评测
  • 测评结果:70
  • 用时:2344ms
  • 内存:649816kb
  • [2023-12-28 06:14:56]
  • 提交

answer

#pragma GCC optimize(2)
/*
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;

map<ll, bool> proc;

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.

    ll hsh;

    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);
    }

    void getHash()
    {
        hsh = (((((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);
    }
    void print(int x)
    {
        printf("%d %d %d %d: %d\n", u, l, d, r, x);
    }
}rec[Maxn+10][Maxn+10];

int cnt;
Rectangle ord[Maxn*Maxn+10];
map<int, Rectangle> mp_find_rect, mp_find_rect_up, mp_find_rect_down;

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)
{
    int h = x * (Maxn + 10) * (Maxn + 10)+ y * (Maxn + 10) + k;
    if(mp_find_rect.find(k) != mp_find_rect.end()) {return mp_find_rect[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;
    }
    mp_find_rect[h] = ret;
    return ret;
}

Rectangle find_up_rect(int x, int y, int k)
{   int h = x * (Maxn + 10) * (Maxn + 10)+ y * (Maxn + 10) + k;
    if(mp_find_rect_up.find(k) != mp_find_rect_up.end()) {return mp_find_rect_up[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;
    }
mp_find_rect_up[h] = ret;
    return ret;
}
Rectangle find_down_rect(int x, int y, int k)
{int h = x * (Maxn + 10) * (Maxn + 10)+ y * (Maxn + 10) + k;
    if(mp_find_rect_down.find(k) != mp_find_rect_down.end()) {return mp_find_rect_down[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;
    }
mp_find_rect_down[h] = ret;
    return ret;
}

int tp;
int nxt[Maxn+10][Maxn+10];
int prv[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;
            }
    }
    for(int i=1; i<=n; i++)
    {
        int pre0 = 0, pre1 = 0;
        for(int j=1; j<=n; j++)
            if(mp[i][j] == 0)
            {
                prv[i][j] = pre1;
                pre0 = j;
            }
            else
            {
                prv[i][j] = pre0;
                pre1 = 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
            {
                rec[i][j] = find_rect(tp+1, i, j);
                rec[i][j].x = i, rec[i][j].y = j;

                rec[i][j].getHash();

                if(rec[i][j].exist())
                {
                    ord[++cnt] = rec[i][j];
                    // hash_mp[rec[i][j].hsh] = true;

                    ord[cnt].getHash();
                }
            }
    }

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

    int tot = 0;

    // rec[4][3].print();
    // rec[3][3].print();
    // find_rect(1, 3, 3).print();

    // assert(n != 2000 || pre[n][n] <= 1);
    assert(cnt < Maxn * Maxn);
    sort(ord+1, ord+cnt+1, cmp);
    for(int i=1; i<=cnt; i++)
    {
        // ord[i].print();

        dp[ord[i].hsh] = max(dp[ord[i].hsh], ord[i].find_area());

        if(ord[i].u != 1)
        {
            if(ord[i].x != ord[i].l && mp[ord[i].u-1][ord[i].x-1] == 0)
            {
                int ed = ord[i].x-1;
                int bg = prv[ord[i].u-1][ed] + 1;

                if(bg < ord[i].l) bg = ord[i].l;

                Rectangle nw = find_up_rect(bg, ed, ord[i].d);
                nw.getHash();

                dp[nw.hsh] = max(dp[nw.hsh], dp[ord[i].hsh] + nw.find_area() - merge(ord[i], nw).find_area());
            }
            if(ord[i].x != ord[i].r && mp[ord[i].u-1][ord[i].x+1] == 0)
            {
                int bg = ord[i].x+1;
                int ed = nxt[ord[i].u-1][bg] - 1;

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

                Rectangle nw = find_up_rect(bg, ed, ord[i].d);
                nw.getHash();
                
                dp[nw.hsh] = max(dp[nw.hsh], dp[ord[i].hsh] + nw.find_area() - merge(ord[i], nw).find_area());
            }
        }
        if(ord[i].d != n && mp[ord[i].d+1][ord[i].x] == 0)
        {
            Rectangle nw = rec[ord[i].x][ord[i].d+1];
            nw.getHash();
            dp[nw.hsh] = max(dp[nw.hsh], dp[ord[i].hsh] + nw.find_area() - merge(ord[i], nw).find_area());
        }

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

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

    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;
// }

詳細信息

Subtask #1:

score: 6
Accepted

Test #1:

score: 6
Accepted
time: 2ms
memory: 12020kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
1
0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1

result:

ok ok

Test #2:

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

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: 6ms
memory: 21960kb

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: 113ms
memory: 86700kb

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: 2344ms
memory: 649816kb

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: 0ms
memory: 12028kb

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: 2ms
memory: 16128kb

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: 1ms
memory: 11976kb

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: 11988kb

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: 12244kb

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: 0ms
memory: 11944kb

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: 0ms
memory: 11976kb

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: 11984kb

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: 11992kb

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: 2ms
memory: 12240kb

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: 11984kb

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: 11988kb

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: 12252kb

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: 11984kb

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: 1ms
memory: 11944kb

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: 12284kb

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: 14032kb

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: 1ms
memory: 12024kb

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: 0ms
memory: 12024kb

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: 0ms
memory: 14296kb

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: 1ms
memory: 12020kb

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: 0ms
memory: 11988kb

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: 0ms
memory: 12080kb

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: 1ms
memory: 12212kb

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: 0ms
memory: 12012kb

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: 12016kb

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: 1ms
memory: 12032kb

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: 18
Accepted

Dependency #3:

100%
Accepted

Test #33:

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

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: 18
Accepted
time: 2ms
memory: 12584kb

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:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
106

result:

ok ok

Test #35:

score: 18
Accepted
time: 2ms
memory: 14388kb

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 1 0 0 0 0
0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 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 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0
0 0 0 0 1 1 0 1 1 0 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
63

result:

ok ok

Test #36:

score: 18
Accepted
time: 0ms
memory: 14340kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
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 0 0 1 1 1 0 0 1 0 0 0
0 0 0 0 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0
0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 0 1 0 0
0 1 1 0 1 1 0 1 1 1 0 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
17

result:

ok ok

Test #37:

score: 18
Accepted
time: 0ms
memory: 14332kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 0 1 0 1 1 1 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 0 1 1 1 1 1 0 1 1 1 1
1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1
0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1
1 1 1 0 1 1 0 1 1 1 1 0 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
5

result:

ok ok

Test #38:

score: 18
Accepted
time: 2ms
memory: 14340kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 1 1 1 1 1 1 1 1 1 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 1 1 1 1 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 1 1 1 1 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 1 1 1 1 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 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
130

result:

ok ok

Test #39:

score: 18
Accepted
time: 2ms
memory: 14260kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
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 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 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 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 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 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
255

result:

ok ok

Test #40:

score: 18
Accepted
time: 2ms
memory: 12256kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
1 1 1 1 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
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
1 1 0 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
1 1 0 0 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 0 0 0 0 0 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
120

result:

ok ok

Test #41:

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

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
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 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 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 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 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 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
129

result:

ok ok

Test #42:

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

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
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 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 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 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 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 1 1 1 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
168

result:

ok ok

Test #43:

score: 18
Accepted
time: 0ms
memory: 16260kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
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 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 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 0 0 0 0 0 1 1 1 1 ...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
216

result:

ok ok

Test #44:

score: 18
Accepted
time: 2ms
memory: 16332kb

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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
587

result:

ok ok

Test #45:

score: 18
Accepted
time: 3ms
memory: 18544kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
30
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 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 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 1 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
435

result:

ok ok

Subtask #5:

score: 16
Accepted

Dependency #4:

100%
Accepted

Test #46:

score: 16
Accepted
time: 426ms
memory: 106404kb

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 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:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
309

result:

ok ok

Test #47:

score: 16
Accepted
time: 336ms
memory: 102272kb

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 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 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 1 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
142

result:

ok ok

Test #48:

score: 16
Accepted
time: 492ms
memory: 113900kb

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 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 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
4031

result:

ok ok

Test #49:

score: 16
Accepted
time: 443ms
memory: 115088kb

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 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 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
7416

result:

ok ok

Test #50:

score: 16
Accepted
time: 458ms
memory: 112896kb

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 1 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 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
865

result:

ok ok

Test #51:

score: 16
Accepted
time: 102ms
memory: 88412kb

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
116065

result:

ok ok

Test #52:

score: 16
Accepted
time: 100ms
memory: 76908kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
126104

result:

ok ok

Test #53:

score: 16
Accepted
time: 105ms
memory: 77436kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
135034

result:

ok ok

Test #54:

score: 16
Accepted
time: 188ms
memory: 91436kb

input:

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

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1003

result:

ok ok

Test #55:

score: 16
Accepted
time: 217ms
memory: 96388kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
25323

result:

ok ok

Test #56:

score: 16
Accepted
time: 37ms
memory: 50208kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
32585

result:

ok ok

Test #57:

score: 16
Accepted
time: 25ms
memory: 43848kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
13614

result:

ok ok

Test #58:

score: 16
Accepted
time: 37ms
memory: 51672kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
31365

result:

ok ok

Test #59:

score: 16
Accepted
time: 56ms
memory: 55040kb

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
500
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 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 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 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 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 1 1 1 1 1 1 1...

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
53193

result:

ok ok

Test #60:

score: 16
Accepted
time: 35ms
memory: 68324kb

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
101365

result:

ok ok

Test #61:

score: 16
Accepted
time: 225ms
memory: 106540kb

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
124750

result:

ok ok

Test #62:

score: 16
Accepted
time: 241ms
memory: 105604kb

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
105570

result:

ok ok

Test #63:

score: 16
Accepted
time: 254ms
memory: 102280kb

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
79800

result:

ok ok

Subtask #6:

score: 0
Time Limit Exceeded

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Test #64:

score: 0
Time Limit Exceeded

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 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 ...

output:


result: