QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#292579#7120. Soccernhuang68570 1870ms1488860kbC++208.7kb2023-12-28 08:59:012024-04-28 08:11:48

Judging History

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

  • [2024-04-28 08:11:48]
  • 管理员手动重测本题所有提交记录
  • 测评结果:70
  • 用时:1870ms
  • 内存:1488860kb
  • [2023-12-28 08:59:02]
  • 评测
  • 测评结果:70
  • 用时:1767ms
  • 内存:1489476kb
  • [2023-12-28 08:59:01]
  • 提交

answer

/**
 * @file soccer2.cpp
 * @author n685
 * @brief
 * @date 2023-12-27
 *
 *
 */
#include "soccer.h"
#include <bits/stdc++.h>

#ifdef LOCAL
#include "dd/debug.h"
#else
#define dbg(...) 42
#define dbgR(...) 4242
#define dbgP(...) 420
#define dbgRP(...) 420420
void nline() {}
#endif

template <class Node> struct ST {
  using T = typename Node::T;
  using RT = typename Node::RT;
  int sz, lg;
  std::vector<std::vector<Node>> st;
  int log(int num) { return 31 - __builtin_clz(num); }
  ST() {}
  ST(const std::vector<T> &arr) : sz((int)arr.size()), lg(log(sz)) {
    st.resize(lg + 1, std::vector<Node>(sz));
    for (int i = 0; i < sz; ++i) {
      st[0][i] = arr[i];
    }

    for (int i = 1; i <= lg; ++i) {
      for (int j = 0; j < sz; ++j) {
        if (j + (1 << i) - 1 >= sz) {
          break;
        }
        st[i][j].pull(st[i - 1][j], st[i - 1][j + (1 << (i - 1))]);
      }
    }
  }
  RT query(int a, int b) {
    int l = log(b - a + 1);
    return Node::comb(st[l][a], st[l][b - (1 << l) + 1]);
  }
};

struct NodeMin {
  using T = std::pair<int, int>;
  using RT = T;
  static constexpr RT ID = std::pair{(int)1e9, (int)1e9};
  T val = ID;

  NodeMin() {}
  NodeMin(T v) : val(v) {}

  operator RT() { return val; }
  static RT comb(RT a, RT b) {
    if (b.first <= a.first) {
      return b;
    } else {
      return a;
    }
  }
  void set(T v) { val = v; }
  void pull(NodeMin &ll, NodeMin &rr) {
    if (rr.val.first <= ll.val.first) {
      val = rr.val;
    } else {
      val = ll.val;
    }
  }
};
struct NodeMin2 {
  using T = std::pair<int, int>;
  using RT = T;
  static constexpr RT ID = std::pair{(int)1e9, (int)1e9};
  T val = ID;

  NodeMin2() {}
  NodeMin2(T v) : val(v) {}

  operator RT() { return val; }
  static RT comb(RT a, RT b) {
    if (a.first <= b.first) {
      return a;
    } else {
      return b;
    }
  }
  void set(T v) { val = v; }
  void pull(NodeMin2 &ll, NodeMin2 &rr) {
    if (ll.val.first <= rr.val.first) {
      val = ll.val;
    } else {
      val = rr.val;
    }
  }
};
struct NodeMax {
  using T = std::pair<int, int>;
  using RT = T;
  static constexpr RT ID = std::pair{-(int)1e9, -(int)1e9};
  T val = ID;

  NodeMax() {}
  NodeMax(T v) : val(v) {}

  operator RT() { return val; }
  static RT comb(RT a, RT b) {
    if (a.first >= b.first) {
      return a;
    } else {
      return b;
    }
  }
  void set(T v) { val = v; }
  void pull(NodeMax &ll, NodeMax &rr) {
    if (ll.val.first >= rr.val.first) {
      val = ll.val;
    } else {
      val = rr.val;
    }
  }
};

struct Rect {
  int tr;
  int d;
  int l, r;
  int ii;
};

int biggest_stadium(int N, std::vector<std::vector<int>> F) {
  auto start = clock();
  auto n = N + 2;
  std::vector<std::pair<int, int>> tr;
  std::vector f(n, std::vector<int>(n, -1));
  auto insT = [&](int i, int j) {
    tr.emplace_back(i, j);
    f[i][j] = (int)tr.size() - 1;
  };
  for (int i = 0; i <= N + 1; ++i) {
    if (f[i][0] == -1) {
      insT(i, 0);
    }
    if (f[i][N + 1] == -1) {
      insT(i, N + 1);
    }
  }
  for (int j = 0; j <= N + 1; ++j) {
    if (f[0][j] == -1) {
      insT(0, j);
    }
    if (f[N + 1][j] == -1) {
      insT(N + 1, j);
    }
  }
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      if (F[i][j]) {
        insT(i + 1, j + 1);
      }
    }
  }
  dbg(clock() - start);
  start = clock();

  int m = (int)tr.size();
  std::vector<ST<NodeMin>> mr(n);
  std::vector<ST<NodeMin2>> mr2(n), md(n);
  for (int i = n - 1; i >= 0; --i) {
    std::vector<std::pair<int, int>> ar, ar2, ad;
    if (i == n - 1) {
      // mr[i] = ST<NodeMin>(std::vector<NodeMin>(n));
      // mr2[i] = Seg<NodeMin2>(n);
      // md[i] = Seg<NodeMin>(n);
      ar.assign(n, NodeMin::ID);
      ar2.assign(n, NodeMin2::ID);
      ad.assign(n, NodeMin2::ID);
    } else {
      ar.resize(n);
      ar2.resize(n);
      ad.resize(n);
      for (int j = 0; j < n; ++j) {
        ar[j] = mr[i + 1].st[0][j];
        ar2[j] = mr2[i + 1].st[0][j];
        ad[j] = md[i + 1].st[0][j];
      }
    }
    for (int j = 0; j < n; ++j) {
      if (f[j][i] >= 0) {
        ar[j] = std::pair{i, f[j][i]};
        ar2[j] = std::pair{i, f[j][i]};
      }
      if (f[i][j] >= 0) {
        ad[j] = std::pair{i, f[i][j]};
      }
    }
    mr[i] = ar;
    mr2[i] = ar2;
    md[i] = ad;
  }
  std::vector<ST<NodeMax>> mu(n);
  for (int i = 0; i < n; ++i) {
    std::vector<std::pair<int, int>> au;
    if (i == 0) {
      au.assign(n, NodeMax::ID);
    } else {
      au.resize(n);
      for (int j = 0; j < n; ++j) {
        au[j] = mu[i - 1].st[0][j];
      }
    }
    for (int j = 0; j < n; ++j) {
      if (f[i][j] >= 0) {
        // mu[i].set(j, std::pair{i, f[i][j]});
        au[j] = std::pair{i, f[i][j]};
      }
    }
    mu[i] = au;
  }
  dbg(clock() - start);
  start = clock();

  std::vector<Rect> rt;
  std::vector<std::vector<int>> id(m);
  for (int t = 0; t < m; ++t) {
    auto [a, b] = tr[t];
    if (a == n - 1) {
      continue;
    }
    int l = 0, r = n - 1;
    while (l <= r && l <= b && b <= r) {
      auto [$, ind] = md[a + 1].query(l, r);
      if (ind == (int)1e9) {
        break;
      }
      auto [i, j] = tr[ind];
      if (i > a + 1 &&
          (rt.empty() || rt.back().tr != t || rt.back().d != i - 1)) {
        rt.push_back(Rect{t, i - 1, l, r, -1});
      }
      if (j <= b) {
        l = j + 1;
      } else {
        r = j - 1;
      }
    }
  }
  dbg(clock() - start);
  start = clock();

  std::sort(rt.begin(), rt.end(), [&](const auto &a, const auto &b) {
    return a.r - a.l > b.r - b.l;
  });
  int k = (int)rt.size();
  for (int i = 0; i < k; ++i) {
    id[rt[i].tr].push_back(i);
    rt[i].ii = (int)id[rt[i].tr].size() - 1;
  }
  dbg(clock() - start);
  start = clock();

  auto added = [&](const Rect &orig, const Rect &nxt) {
    auto [i1, d1, l1, r1, ii1] = orig;
    auto [i2, d2, l2, r2, ii2] = nxt;
    int u1 = tr[i1].first + 1;
    int u2 = tr[i2].first + 1;
    return (r2 - l2 + 1) * ((d2 - u2) - (d1 - u1));
  };
  std::vector<int> dp(k);
  for (int i = 0; i < k; ++i) {
    auto [ind, d, l, r, ii] = rt[i];
    int u = tr[ind].first + 1;
    dp[i] = (d - u + 1) * (r - l + 1);
  }
  int ans = 0;
  for (int i = 0; i < k; ++i) {
    ans = std::max(ans, dp[i]);
    auto [ind, d, l1, r1, ii] = rt[i];
    int u = tr[ind].first + 1;

    if (ii < (int)id[ind].size() - 1) {
      // Rect &r2 = rt[id[ind][ii + 1]];
      // dp[id[ind][ii + 1]] =
      //     std::max(dp[id[ind][ii + 1]], dp[i] + added(rt[i], r2));
      int r2 = id[ind][ii + 1];
      dp[r2] = std::max(dp[r2], dp[i] + added(rt[i], rt[r2]));
    }
    int l = l1;
    int r = r1;
    while (l <= r) {
      auto [$, i3] = mu[u].query(l, r);
      if (i3 < 0 || tr[i3].first != u - 1) {
        break;
      }
      if (tr[i3].second - 1 >= l) {
        auto [$$, i2] = mu[u].query(l, tr[i3].second - 1);
        int r2 = *std::lower_bound(
            id[i2].begin(), id[i2].end(), l, [&](const auto &a, const auto &v) {
              return rt[a].l < l || rt[a].r > tr[i3].second - 1;
            });
        dp[r2] = std::max(dp[r2], dp[i] + added(rt[i], rt[r2]));
      }
      l = tr[i3].second + 1;
    }
    if (l <= r) {
      auto [$$, i3] = mu[u].query(l, r);
      int r2 = *std::lower_bound(id[i3].begin(), id[i3].end(), l,
                                 [&](const auto &a, const auto &v) {
                                   return rt[a].l < l || rt[a].r > r;
                                 });
      dp[r2] = std::max(dp[r2], dp[i] + added(rt[i], rt[r2]));
    }

    l = l1;
    r = r1;
    while (l <= r) {
      auto [$, i3] = md[d].query(l, r);
      if (i3 < 0 || tr[i3].first != d + 1) {
        break;
      }
      if (tr[i3].second - 1 >= l) {
        auto [$$, i2] = mu[u].query(l, tr[i3].second - 1);
        int r2 = *std::lower_bound(
            id[i2].begin(), id[i2].end(), l, [&](const auto &a, const auto &v) {
              return rt[a].l < l || rt[a].r > tr[i3].second - 1;
            });
        dp[r2] = std::max(dp[r2], dp[i] + added(rt[i], rt[r2]));
      }
      l = tr[i3].second + 1;
    }
    if (l <= r) {
      auto [$$, i3] = mu[u].query(l, r);
      int r2 = *std::lower_bound(id[i3].begin(), id[i3].end(), l,
                                 [&](const auto &a, const auto &v) {
                                   return rt[a].l < l || rt[a].r > r;
                                 });
      dp[r2] = std::max(dp[r2], dp[i] + added(rt[i], rt[r2]));
    }
  }
  dbg(clock() - start);
  start = clock();
  return ans;
}

詳細信息

Subtask #1:

score: 6
Accepted

Test #1:

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

input:

R0R7sb2atQWJ6SAWOjw4ZG7Gwgo5zl9L
1
0

output:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
1

result:

ok ok

Test #2:

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

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: 3ms
memory: 6744kb

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: 32ms
memory: 78700kb

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: 533ms
memory: 1432756kb

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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: 95ms
memory: 81612kb

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: 91ms
memory: 83708kb

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: 38ms
memory: 78956kb

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: 43ms
memory: 78820kb

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: 58ms
memory: 80048kb

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: 40ms
memory: 78764kb

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: 214ms
memory: 82260kb

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: 197ms
memory: 81936kb

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: 497ms
memory: 83516kb

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: 85ms
memory: 82112kb

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: 508ms
memory: 84876kb

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: 597ms
memory: 85368kb

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: 519ms
memory: 84952kb

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: 423ms
memory: 84308kb

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: 456ms
memory: 83820kb

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: 146ms
memory: 81640kb

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: 131ms
memory: 84756kb

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: 165ms
memory: 85172kb

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: 30
Accepted
time: 1870ms
memory: 1488860kb

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:

xlqtkQVzqzbOJxjzxlqsyVrlM2kqlbK0
OK
375

result:

ok ok

Test #65:

score: 0
Time Limit Exceeded

input:

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

output:


result: