QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#783285#9637. S>a<MJWRuixi100 ✓292ms171228kbC++172.6kb2024-11-26 07:35:272024-11-26 07:35:28

Judging History

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

  • [2024-11-26 07:35:28]
  • 评测
  • 测评结果:100
  • 用时:292ms
  • 内存:171228kb
  • [2024-11-26 07:35:27]
  • 提交

answer

#ifdef LOCAL
#include "stdafx.h"
#else
#include <bits/stdc++.h>
#define IL inline
#define LL long long
#define eb emplace_back
#define sz(v) ((int) (v).size())
#define me(f, x) memset(f, x, sizeof(f))
#define mc(f, g) memcpy(f, g, sizeof(g))
#define L(i, j, k) for (int i = (j); i <= (k); ++i)
#define R(i, j, k) for (int i = (j); i >= (k); --i)
#define FIO(FILE) freopen(FILE".in", "r", stdin), freopen(FILE".out", "w", stdout)
using namespace std;

using vi = vector<int>;
#endif

constexpr int N = 205;
constexpr int P = 1e9 + 7;
int n, m, a[N];

int f[2][N][N][N];
int fp[N][N][N];
int fq[N][N][N];

int g[N][N][N];
int gp[N][N];

int h[N];

int main () {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  L (i, 1, m) {
    int x;
    cin >> x, ++a[x];
  }
  a[0] = max(a[0], 1);
  g[n + 1][0][0] = 1;
  L (i, 0, n) {
    gp[0][i] = 1;
  }
  R (i, n, 0) {
    L (j, 0, n) {
      L (k, j, n) {
        if (a[i] == 0) {
          (g[i][j][k] += g[i + 1][j][k]) %= P;
        }
        int up = max(1, a[i]);
        if (j > 0 && k >= up) {
          (g[i][j][k] += gp[j - 1][k - up]) %= P;
        }
      }
    }
    L (j, 0, n) {
      L (k, j, n) {
        gp[j][k] = ((k > 0 ? gp[j][k - 1] : 0) + g[i][j][k]) % P;
      }
    }
  }
  L (i, a[0], n) {
    L (x, 0, n - i) {
      L (y, 0, i + x) {
        f[0][i][x][y] = 1;
      }
    }
  }
  L (i, 1, n) {
    int o = i & 1;
    if (a[i] == 0) {
      L (j, 0, n) {
        L (k, 0, min(n - i, n - j)) {
          h[i + k] = (h[i + k] + (LL)f[o ^ 1][j][n - j - k][1] * g[i + 1][k][n - j]) % P; 
        }
      }
    }
    int up = i > 1 ? n / (i - 1) : n;
    L (j, 0, n) {
      L (x, 0, n - j) {
        L (y, 0, up) {
          int &v = f[o ^ 1][j][x][y];
          fp[j][x][y] = ((j > 0 && y > 0 ? fp[j - 1][x][y - 1] : 0) + v) % P;
          fq[j][x][y] = ((j > 0 ? fq[j - 1][x + 1][y] : 0) + v) % P;
          v = 0;
        }
      }
    }
    L (j, a[i], n) {
      L (x, 0, n - j) {
        L (y, 0, (j + x) / i) {
          LL w = 0;
          if (y < a[i]) {
            w = fq[j - a[i]][x + a[i] - y][y];
          } else {
            int t = max(2 * y - up, a[i]);
            w = fp[j - t][x][2 * y - t];
            if (j >= y) {
              w += P - fp[j - y][x][y] + fq[j - y][x][y];
            }
          }
          f[o][j][x][y] = w % P;
        }
      }
    }
  }
  L (t, 0, n) {
    L (i, 0, t - 1) {
      h[i] = (h[i] + g[0][t][n]) % P;
    }
  }
  L (i, 1, n - 1) {
    (h[i] += P - h[i + 1]) %= P;
  }
  L (i, 1, n) {
    cout << h[i] << " \n"[i == n]; 
  }
}
// I love WHQ!

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 216ms
memory: 166072kb

input:

191 191
1 41 56 98 147 57 136 75 67 90 47 13 72 154 175 65 60 123 153 51 77 181 151 164 61 113 35 137 96 143 142 11 161 33 122 5 61 110 96 9 6 176 12 91 97 150 91 116 137 131 4 0 74 77 140 97 134 191 80 170 180 87 191 164 28 8 94 140 28 122 2 19 166 5 25 93 63 58 162 131 66 90 48 17 155 92 107 8 13 ...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #2:

score: 15
Accepted
time: 189ms
memory: 159048kb

input:

181 181
1 39 138 103 175 129 39 123 76 94 98 158 29 87 71 21 106 138 94 35 76 90 69 137 137 79 19 86 76 101 90 77 84 34 23 120 111 77 56 146 75 177 108 21 48 147 37 101 140 122 9 121 51 155 170 76 25 44 63 76 147 112 150 23 139 10 32 60 80 167 11 83 171 113 150 72 73 84 115 96 5 148 120 116 14 47 1 ...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #3:

score: 15
Accepted
time: 165ms
memory: 147876kb

input:

171 171
0 98 92 53 134 68 42 8 140 74 109 160 78 44 143 77 104 100 131 163 82 116 147 13 166 46 66 111 7 154 11 52 99 4 136 156 70 115 136 50 84 83 121 35 127 124 170 106 103 149 14 151 160 66 60 60 123 166 117 87 57 101 158 89 147 139 83 96 33 32 44 54 59 9 160 0 143 6 65 128 68 38 169 148 121 65 3...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #4:

score: 15
Accepted
time: 138ms
memory: 139424kb

input:

161 161
1 2 146 118 53 15 130 18 45 105 52 24 65 99 22 6 92 12 132 71 83 150 155 75 110 36 106 121 29 54 9 26 30 91 31 105 80 36 49 25 13 70 22 130 112 67 6 35 156 125 10 80 35 30 10 60 36 153 118 75 20 1 153 144 103 32 104 112 41 7 59 92 160 32 155 24 141 8 142 51 144 125 22 53 141 89 101 119 153 6...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #5:

score: 15
Accepted
time: 117ms
memory: 132996kb

input:

151 151
0 34 112 80 40 15 85 149 150 129 59 100 100 109 64 26 11 133 117 3 135 59 119 86 23 82 41 44 46 37 40 68 141 46 13 90 118 81 127 148 58 38 78 116 69 130 137 25 101 46 65 69 134 127 60 40 64 68 75 60 79 84 44 95 107 29 56 60 30 38 134 50 105 126 31 83 38 34 40 62 31 139 11 86 14 126 38 65 123...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #6:

score: 15
Accepted
time: 233ms
memory: 166964kb

input:

191 191
0 3 0 19 12 15 7 16 7 153 15 5 12 13 13 7 15 5 13 2 13 0 3 10 12 15 16 13 1 170 16 3 0 10 0 10 6 17 15 2 14 0 107 12 7 5 6 0 19 2 1 4 13 18 0 8 101 2 18 5 2 19 57 13 16 15 4 9 6 2 18 17 4 5 17 19 9 18 6 2 0 180 10 13 13 12 6 7 3 6 4 8 66 12 6 4 17 15 100 1 3 4 15 6 9 0 7 12 8 2 3 13 9 7 2 8 ...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #7:

score: 15
Accepted
time: 213ms
memory: 158132kb

input:

181 181
0 138 13 15 94 29 10 14 18 1 11 18 7 3 15 17 9 0 4 12 11 6 18 4 10 5 4 12 12 12 15 8 6 13 17 5 3 5 10 14 5 9 0 0 17 15 13 0 3 7 3 6 6 0 3 11 17 6 13 18 18 2 1 14 18 9 1 14 1 5 1 15 14 8 4 6 13 4 12 10 6 5 17 17 0 4 8 2 7 11 15 43 11 1 0 13 9 6 10 4 8 16 0 18 7 1 15 9 17 6 58 81 8 4 14 1 9 0 ...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #8:

score: 15
Accepted
time: 175ms
memory: 148756kb

input:

171 171
0 10 0 4 140 8 6 6 15 16 7 14 7 2 9 10 16 14 10 50 16 5 15 10 5 12 12 4 1 57 1 1 9 2 10 4 3 8 2 2 148 9 12 0 4 3 7 5 15 5 4 12 14 14 14 10 7 15 128 13 0 13 16 3 4 6 35 9 15 11 0 13 13 17 17 10 14 9 14 12 10 1 13 1 13 17 110 14 14 12 7 17 15 5 14 16 15 4 14 7 12 6 16 16 7 13 146 136 1 17 3 5 ...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #9:

score: 15
Accepted
time: 147ms
memory: 139628kb

input:

161 161
0 14 14 9 0 12 4 12 16 11 0 2 0 10 6 13 10 10 12 8 14 10 15 0 0 3 0 15 2 3 12 14 13 8 16 14 160 5 13 15 4 10 1 5 4 3 95 16 5 3 16 0 4 15 12 1 9 5 2 13 9 8 10 1 3 1 10 6 16 81 5 9 2 6 16 10 7 5 1 12 14 6 2 16 153 1 16 7 50 9 4 11 16 6 0 10 1 15 7 0 0 16 1 2 4 5 10 15 16 11 16 2 1 5 3 12 12 13...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #10:

score: 15
Accepted
time: 112ms
memory: 130304kb

input:

151 151
0 8 0 0 13 14 3 12 11 13 11 3 6 10 4 5 4 14 10 1 12 14 4 10 1 14 5 7 8 4 4 12 7 5 4 14 2 6 11 2 139 11 14 123 10 2 5 0 8 13 14 121 12 9 3 11 63 8 2 11 1 2 1 5 5 2 3 8 8 136 8 6 81 10 7 14 2 9 14 12 9 15 149 3 10 14 62 5 10 15 11 5 8 3 3 3 2 6 1 2 7 6 41 0 1 7 12 14 2 8 108 135 5 11 0 4 1 0 1...

output:

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

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Subtask #2:

score: 15
Accepted

Test #11:

score: 15
Accepted
time: 0ms
memory: 22000kb

input:

12 0


output:

0 0 0 53 4014 49854 252140 568092 364602 99660 13530 133

result:

ok single line: '0 0 0 53 4014 49854 252140 568092 364602 99660 13530 133'

Test #12:

score: 15
Accepted
time: 0ms
memory: 22044kb

input:

11 0


output:

0 0 0 85 3093 33236 131124 128352 48300 8415 111

result:

ok single line: '0 0 0 85 3093 33236 131124 128352 48300 8415 111'

Test #13:

score: 15
Accepted
time: 0ms
memory: 20096kb

input:

12 3
12 1 2

output:

0 0 0 0 201 4250 23674 47670 42630 7140 396 9

result:

ok single line: '0 0 0 0 201 4250 23674 47670 42630 7140 396 9'

Test #14:

score: 15
Accepted
time: 0ms
memory: 20068kb

input:

11 0


output:

0 0 0 85 3093 33236 131124 128352 48300 8415 111

result:

ok single line: '0 0 0 85 3093 33236 131124 128352 48300 8415 111'

Test #15:

score: 15
Accepted
time: 0ms
memory: 20108kb

input:

10 5
0 6 0 5 2

output:

0 0 0 0 0 231 1631 1000 135 6

result:

ok single line: '0 0 0 0 0 231 1631 1000 135 6'

Test #16:

score: 15
Accepted
time: 0ms
memory: 20028kb

input:

9 2
1 3

output:

0 0 0 49 716 1965 1680 588 7

result:

ok single line: '0 0 0 49 716 1965 1680 588 7'

Test #17:

score: 15
Accepted
time: 2ms
memory: 22004kb

input:

12 3
1 6 10

output:

0 0 0 0 0 755 11256 52954 45165 13895 1936 9

result:

ok single line: '0 0 0 0 0 755 11256 52954 45165 13895 1936 9'

Test #18:

score: 15
Accepted
time: 0ms
memory: 20236kb

input:

11 9
0 0 0 0 1 0 0 1 0

output:

0 0 0 9 41 28 0 0 0 0 0

result:

ok single line: '0 0 0 9 41 28 0 0 0 0 0'

Test #19:

score: 15
Accepted
time: 0ms
memory: 20180kb

input:

10 6
0 1 6 0 1 0

output:

0 0 0 0 65 566 335 35 0 0

result:

ok single line: '0 0 0 0 65 566 335 35 0 0'

Test #20:

score: 15
Accepted
time: 0ms
memory: 18084kb

input:

9 3
2 8 0

output:

0 0 0 0 175 1995 2240 540 55

result:

ok single line: '0 0 0 0 175 1995 2240 540 55'

Subtask #3:

score: 15
Accepted

Dependency #2:

100%
Accepted

Test #21:

score: 15
Accepted
time: 0ms
memory: 33196kb

input:

30 0


output:

0 0 0 0 59 49831 9935753 711470537 49655876 339821300 821952385 245380287 659461356 285632126 44662611 753838926 707274653 634953398 928086849 242098944 358860245 380468859 958478310 439421626 598888080 64437050 18196233 113767290 1711290 871

result:

ok single line: '0 0 0 0 59 49831 9935753 71147... 18196233 113767290 1711290 871'

Test #22:

score: 15
Accepted
time: 0ms
memory: 35060kb

input:

29 0


output:

0 0 0 0 84 64238 10118696 624942245 177987690 783976476 785282674 324155058 80858911 521626602 318157457 773335452 917078048 524312664 750687308 56470608 918785599 854157758 906551244 50904360 370116755 304851172 88677225 1436022 813

result:

ok single line: '0 0 0 0 84 64238 10118696 6249... 304851172 88677225 1436022 813'

Test #23:

score: 15
Accepted
time: 0ms
memory: 34968kb

input:

30 17
15 16 22 14 27 17 27 23 1 17 25 17 11 12 20 20 7

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24203852 278724639 910579925 198994746 22607359 901222800 583880253 121266651 15543242 1090180 3185 0 0 0

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...651 15543242 1090180 3185 0 0 0'

Test #24:

score: 15
Accepted
time: 3ms
memory: 32824kb

input:

29 10
21 16 6 27 13 19 25 0 17 8

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 166384255 665219654 284294211 983247806 28396674 827938092 681830628 243867768 889249660 872926673 623311120 834128921 721801080 24590160 628488 552

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 1663...1 721801080 24590160 628488 552'

Test #25:

score: 15
Accepted
time: 0ms
memory: 32740kb

input:

28 8
5 0 27 24 8 4 16 12

output:

0 0 0 0 0 0 0 0 0 0 8813447 421133714 437785704 807002083 862992732 414654268 859428113 766224428 227560953 463154133 12376243 339221864 678747968 595558674 758644380 25401519 632016 561

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 8813447 42...4 758644380 25401519 632016 561'

Test #26:

score: 15
Accepted
time: 0ms
memory: 32900kb

input:

27 17
4 18 9 12 27 1 24 19 13 24 19 21 6 26 9 14 22

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1766130 11686803 26544411 29415876 17715570 5848710 1146090 19470 220 0 0

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 5848710 1146090 19470 220 0 0'

Test #27:

score: 15
Accepted
time: 0ms
memory: 35060kb

input:

30 12
2 1 3 3 2 0 0 0 0 1 0 3

output:

0 0 0 0 0 2851 420897 20846873 466942127 645206143 891715839 137383558 608751539 827595582 743346329 181869778 5943848 494089561 63772990 726084195 909773023 111642575 1562275 0 0 0 0 0 0 0

result:

ok single line: '0 0 0 0 0 2851 420897 20846873...111642575 1562275 0 0 0 0 0 0 0'

Test #28:

score: 15
Accepted
time: 0ms
memory: 33196kb

input:

29 13
1 2 0 1 2 2 1 2 2 1 0 1 1

output:

0 0 0 0 0 3318 392700 19799575 364638568 384364735 451651511 856966807 958433653 678802936 168464577 367183311 723861376 688752434 893723558 67336456 2042975 0 0 0 0 0 0 0 0

result:

ok single line: '0 0 0 0 0 3318 392700 19799575...7336456 2042975 0 0 0 0 0 0 0 0'

Test #29:

score: 15
Accepted
time: 0ms
memory: 32848kb

input:

28 10
2 0 1 5 0 1 2 0 2 5

output:

0 0 0 0 0 514 148740 9077622 228322086 895878519 272783673 234595276 251027560 71814428 951768368 226478118 539947609 73266951 919977999 897827991 367266504 12661638 235543 0 0 0 0 0

result:

ok single line: '0 0 0 0 0 514 148740 9077622 2...66504 12661638 235543 0 0 0 0 0'

Test #30:

score: 15
Accepted
time: 0ms
memory: 32752kb

input:

27 5
2 1 2 1 0

output:

0 0 0 0 66 36549 3910610 162000155 501842757 235880986 341378362 379073273 43893727 283763569 640660105 279058003 475315996 562463119 984166617 875030237 971478268 46157505 106648080 3391465 50876 0 0

result:

ok single line: '0 0 0 0 66 36549 3910610 16200...505 106648080 3391465 50876 0 0'

Subtask #4:

score: 20
Accepted

Dependency #3:

100%
Accepted

Test #31:

score: 20
Accepted
time: 8ms
memory: 64656kb

input:

70 0


output:

0 0 0 0 0 0 238868 406212731 661427582 90905085 214553296 323133422 473481835 48148520 135813452 567029534 83822479 69469793 39061927 873419988 719959267 473049979 432053669 904182825 120761758 352990397 220175386 714390360 130935063 945272999 312699702 938158607 843352283 936222555 288207006 461320...

result:

ok single line: '0 0 0 0 0 0 238868 406212731 6...291244 204393873 130363310 4831'

Test #32:

score: 20
Accepted
time: 4ms
memory: 62800kb

input:

69 0


output:

0 0 0 0 0 0 251409 410526139 341711055 624807877 57365837 669499046 796736570 600293959 428142610 238743524 588736079 506913709 115887404 72105544 76880745 61778370 193605611 468440457 359640921 998467991 878785549 499146306 211840146 14564730 537552579 996280055 111556991 565711418 362990464 835342...

result:

ok single line: '0 0 0 0 0 0 251409 410526139 3...431278 217162813 121187322 4693'

Test #33:

score: 20
Accepted
time: 8ms
memory: 64580kb

input:

70 35
30 20 69 2 66 14 64 16 5 21 4 68 31 7 15 5 58 37 66 11 21 39 69 47 45 9 67 11 18 15 8 66 64 2 51

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 523528113 558523433 144514978 948215375 121435090 925783372 863369157 938105917 813794657 970382754 533568188 780371891 677634238 822369293 393982373 525623596 391888586 547054876 802140323 286363249 176764262 277889251 5565423 710711785 4315...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...5635596 118030185 0 0 0 0 0 0 0'

Test #34:

score: 20
Accepted
time: 3ms
memory: 62764kb

input:

69 32
23 45 20 13 40 4 66 46 12 55 68 18 22 31 68 60 49 19 57 9 0 47 22 51 39 56 1 1 6 53 45 5

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 426954704 13391085 35784739 52825835 797458877 419793433 475598250 973514389 461483112 613003973 734330227 484204541 307004370 414271815 49697758 97813524 857571772 550720760 394280849 446146015 546834821 906435073 10223773 698324582 75061345...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...44267575 417276113 192660 0 0 0'

Test #35:

score: 20
Accepted
time: 7ms
memory: 60428kb

input:

68 54
25 1 24 3 8 24 15 15 50 68 11 43 27 26 17 64 48 67 25 45 46 21 60 8 68 28 1 63 11 41 53 33 10 65 35 31 52 36 50 6 21 11 12 6 34 63 7 47 52 59 43 9 63 41

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 162877752 157867421 747779662 705584203 391060942 826212526 897856805 812443574 237833680 543465495 755692555 651466693 37442160 0 0 0 0 0 0 0 0 0 0 0 0 0 0

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...160 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #36:

score: 20
Accepted
time: 4ms
memory: 60704kb

input:

67 16
46 23 38 15 1 21 37 21 40 16 53 12 25 63 35 15

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 955482340 437579260 721134568 943654826 317509211 582348346 369777494 230201979 284223790 644588162 686999538 443878983 468175369 284226161 310093765 400926910 423080865 783153933 523253928 404732167 88827740 584520850 415417433 505610337 8839527 666691847 3094128...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...5959715 67115868 1457325 1326 0'

Test #37:

score: 20
Accepted
time: 12ms
memory: 61276kb

input:

70 49
6 1 1 7 5 4 6 4 7 6 2 6 6 6 1 4 6 3 4 5 6 5 2 58 7 1 2 22 3 3 4 0 0 0 0 4 7 3 5 0 7 7 4 3 1 3 6 1 21

output:

0 0 0 0 0 0 0 0 0 0 0 0 71664401 656034542 243745614 492821515 95211276 663269750 411458475 701309316 21170917 873583283 881380023 780396665 49065395 204332827 74009623 251582134 315158333 335951511 156504876 87033047 402233947 187041997 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 716644...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #38:

score: 20
Accepted
time: 12ms
memory: 61152kb

input:

69 67
3 0 1 0 4 6 6 0 0 3 69 57 52 1 1 18 6 6 1 5 1 62 2 4 1 5 61 51 4 3 5 2 5 6 2 2 4 5 5 5 1 5 1 2 1 41 17 4 6 3 3 29 4 2 4 0 0 1 6 6 4 4 3 0 2 0 3

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 120 940 1425 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #39:

score: 20
Accepted
time: 12ms
memory: 63036kb

input:

68 3
0 1 1

output:

0 0 0 0 0 0 250114 378634563 20457399 930507023 283435834 724024291 331843470 422936878 697175517 583110871 701902698 114822434 941079045 148364301 32673858 759738927 969158834 559928897 383729146 992695516 351349247 933390586 470018660 551592253 642424049 711543875 850617400 765381614 673635194 979...

result:

ok single line: '0 0 0 0 0 0 250114 378634563 2...60 545266409 104014560 143781 0'

Test #40:

score: 20
Accepted
time: 8ms
memory: 58672kb

input:

67 64
3 4 6 2 1 5 6 3 0 5 58 6 2 0 2 4 5 3 2 3 43 2 6 2 0 5 2 6 0 8 3 1 6 6 3 39 4 5 5 3 0 6 4 4 63 4 1 21 0 0 0 1 6 6 4 6 0 3 1 5 19 6 2 6

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 798 7923 23919 22100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Subtask #5:

score: 15
Accepted

Dependency #4:

100%
Accepted

Test #41:

score: 15
Accepted
time: 68ms
memory: 103344kb

input:

120 0


output:

0 0 0 0 0 0 1871 28691451 407866461 77847620 922984878 916240735 566233853 343922465 988253004 802705564 115038599 387891951 620937069 135451676 736237286 165835180 650169977 362504419 590584639 67024156 574369257 130734466 5006208 110485871 466354874 414797851 5898563 725026009 703419309 510219472 ...

result:

ok single line: '0 0 0 0 0 0 1871 28691451 4078...33250 789375664 988768453 14281'

Test #42:

score: 15
Accepted
time: 54ms
memory: 103160kb

input:

119 0


output:

0 0 0 0 0 0 2311 32309220 18124316 158874573 238059633 112056308 704696490 626419408 21803627 674558256 469206559 204926022 864115987 671963150 887759599 417434628 13987289 207602730 230970792 116359839 77085870 285034454 55845580 598854687 649953175 740575544 756589191 490564139 850909735 80535254 ...

result:

ok single line: '0 0 0 0 0 0 2311 32309220 1812...79216 508608032 906601690 14043'

Test #43:

score: 15
Accepted
time: 65ms
memory: 103328kb

input:

120 20
77 27 107 55 4 48 91 104 107 7 51 108 14 72 61 46 42 82 20 66

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 339288817 711323183 349805874 805765977 210636045 948652299 756346052 255233029 807253606 3880440 958061020 36734987 509364039 198236145 141277874 385309556 136621562 488063927 523180897 934405289 14777353 393492718 683298131 9059627 80736227 710555045...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...895844677 99391533 34647921 100'

Test #44:

score: 15
Accepted
time: 47ms
memory: 103632kb

input:

119 32
6 64 14 28 114 51 14 81 33 54 90 109 99 46 27 38 47 118 89 26 52 60 31 25 32 114 116 101 13 93 59 33

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 725885679 468691020 928799319 351137783 758836429 34321566 205871143 563394579 971191264 32144245 698787346 528006052 813595986 509050914 535604335 779590867 822105249 216993171 959059201 943800427 780932590 157813220 698531153 7086...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...35494 672942540 12945107 3828 0'

Test #45:

score: 15
Accepted
time: 55ms
memory: 103040kb

input:

118 17
36 108 18 102 94 9 93 109 118 102 42 109 31 116 105 53 93

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 631067660 781458453 659592447 136784632 109722822 990999586 740391940 223719488 486242249 750936735 44186026 474399514 405680956 433713504 502013664 852317395 92276881 180004511 691328117 31122915 160619628 382324042 282029509 280604646 701529008 544231631 188...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...44528 111992815 20083850 5151 0'

Test #46:

score: 15
Accepted
time: 51ms
memory: 100436kb

input:

117 56
62 22 97 29 93 63 40 87 29 106 44 24 75 87 63 31 67 46 114 98 52 44 77 68 5 8 4 14 28 18 52 31 30 114 72 8 90 40 65 10 26 50 66 18 1 11 75 66 1 7 93 58 58 8 22 80

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 785978099 284975133 903702123 907041181 984137400 122452197 129830583 309456638 184316142 769936685 347259505 55278425 68510628 874997993 880806914 225878368 312735183 916304546 908309179 772366758 87033499 307089946...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #47:

score: 15
Accepted
time: 57ms
memory: 101748kb

input:

120 64
4 8 12 3 3 2 8 1 9 2 6 3 5 0 7 57 34 1 8 12 5 7 5 66 6 8 9 1 12 8 6 11 4 6 2 8 1 2 0 6 11 5 5 12 2 11 2 27 9 12 3 10 8 7 2 10 8 18 0 2 4 9 5 5

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 356906034 804836128 64021223 204462630 407399750 715944907 826151288 447132292 307209333 351945063 386200821 933753372 618335426 282103392 945330678 173568265 347056232 622257447 156451370 834183291 530743005 739723093 790127039 888388815 578912344 755583968 95500...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #48:

score: 15
Accepted
time: 43ms
memory: 103000kb

input:

119 78
5 6 10 5 7 10 3 7 0 0 72 9 28 2 1 8 6 58 2 9 1 87 3 3 10 2 1 10 6 3 9 6 9 10 0 2 7 7 1 7 1 5 2 4 2 3 7 7 7 7 5 9 2 3 9 7 10 87 1 4 4 10 4 7 10 2 6 9 1 3 10 10 9 5 2 4 2 8

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 428462220 314243745 409760443 362980541 157887697 806425121 886527635 422790683 317964801 612629116 772265882 153653993 530543645 477704799 28533537 582914248 881617265 917236889 196410774 332368576 724686981 334406262 229520375 503969368 411355858 309972787 125206494...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #49:

score: 15
Accepted
time: 56ms
memory: 101408kb

input:

118 73
9 6 3 97 2 1 1 98 0 10 2 6 2 3 2 2 5 7 10 6 63 3 9 7 9 11 74 5 6 8 10 9 104 1 11 9 11 5 2 11 11 0 7 11 2 1 10 0 102 11 23 0 6 4 11 6 3 0 83 5 8 9 6 9 2 1 5 5 6 0 9 11 1

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 373488182 228114224 487485067 729266295 258206626 55659539 921021369 339801865 888300467 371752156 981358327 941940121 891320543 596862615 750636979 886263176 184897781 216662267 112629592 665075562 414266757 193282680 374475766 116107790 649475013 227939031 9...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #50:

score: 15
Accepted
time: 56ms
memory: 100620kb

input:

117 63
8 11 2 4 3 7 7 6 2 0 4 11 1 9 6 4 2 2 2 1 10 3 9 39 8 5 4 5 5 9 68 3 1 2 6 2 2 8 0 4 6 4 4 5 9 4 8 6 5 9 10 9 10 3 9 6 6 9 4 2 64 6 10

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 220637684 990483516 722712354 127808358 603527219 683317219 315950398 187302042 389874264 890200814 939995468 828287914 681427641 248776995 784116000 145352464 829559345 671111669 320519794 518545361 398176540 10997128 67724899 386614782 542231992 36339870 236659462 230...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Subtask #6:

score: 20
Accepted

Dependency #1:

100%
Accepted

Dependency #5:

100%
Accepted

Test #51:

score: 20
Accepted
time: 292ms
memory: 170524kb

input:

200 0


output:

0 0 0 0 0 0 0 556653 764662787 936659292 201135447 849984606 341533210 754565819 700854458 156621691 791342062 950126307 833096754 221075498 176657504 863276468 29554120 53494478 741601396 946697314 110852872 18846586 508979743 137540647 906206512 692715815 369857949 573777570 362508809 509077393 43...

result:

ok single line: '0 0 0 0 0 0 0 556653 764662787...8841836 282914684 7289918 39801'

Test #52:

score: 20
Accepted
time: 275ms
memory: 170312kb

input:

199 0


output:

0 0 0 0 0 0 0 588480 236772485 13788063 459154483 264661346 119214163 799140797 371341203 770931637 134367605 419197133 480925823 577825801 480891220 247343009 752817383 785533481 276474233 868600515 149545625 935671413 494584831 683813847 372490782 25908114 142194439 753753354 655513928 601754743 9...

result:

ok single line: '0 0 0 0 0 0 0 588480 236772485...43203 122259151 360381322 39403'

Test #53:

score: 20
Accepted
time: 260ms
memory: 169604kb

input:

200 175
26 90 197 62 20 112 179 54 123 163 182 174 128 184 90 28 144 142 0 88 133 177 84 99 54 70 80 141 160 134 27 163 44 122 194 77 67 36 24 43 45 104 124 158 4 5 64 161 193 45 0 106 39 36 173 87 123 88 11 137 9 191 178 140 141 22 52 43 46 141 96 88 42 22 41 17 145 134 90 117 101 166 108 163 98 10...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 534927113 688514880 686502724 809496980 16024374 774016889 578...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #54:

score: 20
Accepted
time: 254ms
memory: 170096kb

input:

199 114
91 63 156 20 80 112 125 174 122 8 21 113 26 135 6 17 182 158 138 103 191 47 124 129 195 153 75 101 155 189 10 17 54 27 115 110 53 30 47 72 101 4 159 160 160 31 23 66 68 94 141 31 34 101 103 20 120 136 130 26 168 28 91 188 191 183 26 44 191 59 50 189 61 199 43 114 51 54 40 38 79 21 58 187 75 ...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 719836600 879613860 132977827 271851578 749248979 987762494 475093535 701600904 552566607 723331753 751263314 489552518 71...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #55:

score: 20
Accepted
time: 269ms
memory: 170512kb

input:

198 62
195 173 118 96 84 100 77 177 49 91 170 103 173 85 167 17 127 161 33 125 59 168 107 186 109 182 25 66 119 22 70 120 78 157 139 178 8 69 182 169 177 100 91 122 129 75 166 17 28 70 10 152 26 68 39 159 193 176 137 59 182 80

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 848103808 200940496 840730433 228325518 356104758 897006821 879855502 289626284 103614538 967173031 645385222 470634044 868648564 19720046 854306913 170654763 491663745 772479530 3...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...240798061 773422462 0 0 0 0 0 0'

Test #56:

score: 20
Accepted
time: 258ms
memory: 171228kb

input:

197 132
17 175 3 93 170 132 35 163 120 182 6 70 79 152 52 103 197 134 2 184 130 70 112 33 94 19 165 119 158 74 184 16 184 13 131 85 189 121 69 23 80 37 185 99 192 18 48 159 99 32 183 15 70 64 181 95 27 167 117 188 9 105 195 166 43 19 125 126 80 57 2 22 21 175 141 94 92 125 74 9 77 65 16 62 68 67 64 ...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 632509254 877481052 715787456 653238774 902186919 864733624 553603080 365760284 998976040 760588707 24...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #57:

score: 20
Accepted
time: 282ms
memory: 170320kb

input:

200 155
11 9 4 0 12 19 2 18 10 15 14 18 17 18 19 15 17 3 7 13 2 133 18 11 1 3 18 6 3 20 4 19 19 12 39 17 12 63 1 7 1 16 11 3 3 0 2 13 12 10 11 14 8 4 14 20 11 3 2 5 20 69 20 19 4 12 17 5 17 15 18 17 124 17 4 12 13 11 14 9 13 20 15 3 1 6 7 5 185 0 6 2 9 1 5 12 10 31 11 50 18 102 8 5 15 0 18 3 5 14 0 ...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 545666415 7141308 475650596 628454545 8329385 713783069 930282858 365431951 190611875 64127518 629071315 301970900 275900477 255111321 925139816 272478966 199071627 392178469 170952446 461853257 27291907 752130317 259417357 909695684 3803...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #58:

score: 20
Accepted
time: 269ms
memory: 167552kb

input:

199 172
16 19 0 4 16 16 13 16 10 9 2 8 3 9 8 9 0 4 9 0 5 16 5 9 1 4 5 14 8 11 15 8 3 9 0 3 18 19 4 9 4 2 16 7 16 0 18 10 17 13 186 3 19 3 7 13 3 16 12 8 44 0 7 10 0 8 0 1 11 12 0 19 16 8 3 7 4 17 7 19 18 1 9 0 13 9 159 2 19 17 1 1 103 7 19 7 18 13 10 5 17 15 6 7 1 0 6 4 10 6 10 4 13 17 19 120 7 6 14...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 190796078 509286813 255298947 159414787 109483503 809059309 421174788 302351098 300405493 879691250 990277980 436263004 641824533 992405755 158386417 99822013 494377081 813238098 642470167 309739287 331638867 67208382 990298681 907827393 73328146...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #59:

score: 20
Accepted
time: 276ms
memory: 170040kb

input:

198 60
15 153 4 1 184 18 6 5 2 17 9 14 14 5 14 11 15 11 6 1 17 11 6 3 7 15 19 4 3 12 6 17 8 135 10 14 14 170 11 17 7 7 4 6 1 16 134 14 0 11 57 8 10 13 12 15 0 12 9 19

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 786046590 351322331 629658981 69788051 743921218 948126421 942710228 198116384 41961389 861378259 812319709 609189089 757880731 409365215 479271159 900802264 838261066 580906983 549914398 37234611 147479633 755138909 703107973 883497191 652012402 795...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'

Test #60:

score: 20
Accepted
time: 257ms
memory: 168092kb

input:

197 177
12 16 1 15 19 12 18 9 4 13 1 12 131 2 6 1 6 3 129 11 13 5 7 43 19 17 11 8 106 3 112 17 15 140 0 73 55 16 3 7 19 13 3 4 2 10 86 19 6 5 19 14 0 0 10 15 1 17 19 7 12 18 7 120 14 14 3 2 90 8 7 13 0 10 1 16 17 16 15 3 15 7 7 94 6 5 17 3 67 12 8 1 1 4 10 2 35 17 7 18 62 7 11 14 3 8 0 10 1 17 6 7 9...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 705137179 886669914 431324610 845517499 630481595 108377551 31680155 606726559 871225990 746995359 818765323 236261203 85722903 294790242 710662258 744572683 676230344 425640331 594662316 153983829 910384166 0 0 0 0 0 0 ...

result:

ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'