QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#531171#7121. Beech Treegreen_gold_dog#66 107ms19772kbC++201.8kb2024-08-24 18:55:532024-08-24 18:55:54

Judging History

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

  • [2024-08-24 18:55:54]
  • 评测
  • 测评结果:66
  • 用时:107ms
  • 内存:19772kb
  • [2024-08-24 18:55:53]
  • 提交

answer

#include "beechtree.h"
#include<bits/stdc++.h>

using namespace std;

typedef int ll;

vector<ll> beechtree(ll n, ll m, vector<ll> p, vector<ll> c) {
	vector<vector<ll>> sons(n);
	for (ll i = 1; i < n; i++) {
		sons[p[i]].push_back(i);
	}
	map<vector<ll>, vector<ll>> all;
	vector<ll> ans(n, 0);
	vector<ll> cd(n);
	vector<ll> h(n);
	ll nh = 0;
	for (ll j = 0; j < n; j++) {
		cd[j] = sons[j].size();
		if (cd[j] == 0) {
			all[vector<ll>(0)].push_back(j);
		}
	}
	while (!all.empty()) {
		auto[_, now] = *all.begin();
		all.erase(all.begin());
		for (auto j : now) {
			h[j] = nh;
			if (p[j] == -1) {
				continue;
			}
			cd[p[j]]--;
			if (cd[p[j]] == 0) {
				vector<ll> ns;
				for (auto k : sons[p[j]]) {
					ns.push_back(h[k]);
				}
				sort(ns.rbegin(), ns.rend());
				all[ns].push_back(p[j]);
			}
		}
		nh++;
	}
	for (ll i = 0; i < n; i++) {
		set<tuple<ll, ll, ll>> s;
		s.insert(make_tuple(-h[i], -1, i));
		bool b = true;
		map<ll, ll> ncol;
		ll nnum = 0;
		while (!s.empty()) {
			auto[_, need, i] = *s.begin();
			s.erase(s.begin());
			if (need != -1) {
				if (ncol[c[i]] != need) {
					b = false;
					break;
				}
				ncol[c[i]]++;
			}
			for (auto j : sons[i]) {
				s.emplace(-h[j], nnum, j);
			}
			nnum++;
		}
		if (b) {
			ans[i] = 1;
		}
	}
	return ans;
}

#ifdef LOCAL
int main()
{
    int N, M;
    assert(2 == scanf("%d %d", &N, &M));
    std::vector<int> P(N);
    for (int i = 0; i < N; ++i)
        assert(1 == scanf("%d", &P[i]));
    std::vector<int> C(N);
    for (int i = 0; i < N; ++i)
        assert(1 == scanf("%d", &C[i]));

    fclose(stdin);

    std::vector<int> res = beechtree(N, M, P, C);

    int n = res.size();
    for (int i = 0; i < n; ++i)
    {
        if (i > 0)
            printf(" ");
        printf("%d", res[i]);
    }
    printf("\n");
    fclose(stdout);

    return 0;
}
#endif

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 9
Accepted

Test #1:

score: 9
Accepted
time: 0ms
memory: 3836kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 281 281 281 281 281 281 281

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1

result:

ok 

Test #2:

score: 9
Accepted
time: 0ms
memory: 4068kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 11 169 169 169 169 169 169

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1

result:

ok 

Test #3:

score: 9
Accepted
time: 0ms
memory: 4084kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 324 324 492 324 324 324 324

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 1 1 1 1 1

result:

ok 

Test #4:

score: 9
Accepted
time: 0ms
memory: 3804kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 1 2 3 4 5 6
0 216 220 387 371 53 34 188

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 0 0 0 0 1 1

result:

ok 

Test #5:

score: 9
Accepted
time: 0ms
memory: 3808kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 500
-1 0 0 0 1 1 2
0 357 147 147 20 147 20

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #6:

score: 9
Accepted
time: 0ms
memory: 3864kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
4 500
-1 0 0 0
0 267 210 278

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1

result:

ok 

Test #7:

score: 9
Accepted
time: 0ms
memory: 4080kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 500
-1 0 0 0 1 2 3
0 250 140 214 250 250 140

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #8:

score: 9
Accepted
time: 0ms
memory: 4068kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 500
-1 0 0 0 1 1 3 3
0 40 205 455 455 36 36 455

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1 1

result:

ok 

Test #9:

score: 9
Accepted
time: 0ms
memory: 3812kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 500
-1 0 0 1 1 1 2
0 181 33 33 181 201 33

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #10:

score: 9
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
5 500
-1 0 0 1 2
0 162 281 162 162

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1

result:

ok 

Subtask #2:

score: 0
Time Limit Exceeded

Test #11:

score: 5
Accepted
time: 83ms
memory: 19772kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200000 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86...

output:

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

Test #12:

score: 5
Accepted
time: 82ms
memory: 19756kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200000 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86...

output:

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

Test #13:

score: 0
Time Limit Exceeded

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200000 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86...

output:


result:


Subtask #3:

score: 9
Accepted

Test #25:

score: 9
Accepted
time: 64ms
memory: 15552kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
103965 200000
-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 0 0 0 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #26:

score: 9
Accepted
time: 53ms
memory: 15144kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
97675 200000
-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 0 0 0 0...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #27:

score: 9
Accepted
time: 54ms
memory: 14976kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
98856 200000
-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 0 0 0 0...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #28:

score: 9
Accepted
time: 68ms
memory: 15408kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
102084 200000
-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 0 0 0 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #29:

score: 9
Accepted
time: 1ms
memory: 3952kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1191 200000
-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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #30:

score: 9
Accepted
time: 1ms
memory: 3900kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
970 200000
-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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #31:

score: 9
Accepted
time: 1ms
memory: 3916kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1066 200000
-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 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #32:

score: 9
Accepted
time: 1ms
memory: 4188kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1057 200000
-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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #33:

score: 9
Accepted
time: 0ms
memory: 3816kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
115 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 6 6 6 6 6 7 7 7 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #34:

score: 9
Accepted
time: 0ms
memory: 3828kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
166 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 1...

output:

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

result:

ok 

Test #35:

score: 9
Accepted
time: 0ms
memory: 4076kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
131 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 10 10 10 10 10 10 10 10 10 11 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #36:

score: 9
Accepted
time: 0ms
memory: 3796kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
137 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 7 7 7 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 1...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #37:

score: 9
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
136 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 3 3 3 3 3 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 12 13 13 13 13 13 13 13 13 13 1...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #38:

score: 9
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
128 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 6 6 6 7 7 7 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 13 13 13 13 13 13 13 13 14 14 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #39:

score: 9
Accepted
time: 0ms
memory: 3880kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
128 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 12 13 13 13 13 13 1...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #40:

score: 9
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
117 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 4 5 5 5 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 1...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #41:

score: 9
Accepted
time: 1ms
memory: 4040kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
104 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 13 13 14 14 14 14 14 14
0 202 10 262 148 4...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #42:

score: 9
Accepted
time: 0ms
memory: 3800kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
121 500
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 8 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 13 14 14 14 14 14 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

result:

ok 

Test #43:

score: 9
Accepted
time: 0ms
memory: 3776kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 1 2 2
0 1 2 1 2 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 0 1 1 1 1

result:

ok 

Test #44:

score: 9
Accepted
time: 0ms
memory: 4076kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 1 2 2
0 1 1 1 2 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #45:

score: 9
Accepted
time: 0ms
memory: 3864kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
5 2
-1 0 0 1 2
0 1 2 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1

result:

ok 

Test #46:

score: 9
Accepted
time: 0ms
memory: 3780kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
4 2
-1 0 1 1
0 1 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1

result:

ok 

Test #47:

score: 9
Accepted
time: 0ms
memory: 4068kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
6 2
-1 0 0 1 2 2
0 1 2 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1

result:

ok 

Subtask #4:

score: 8
Accepted

Test #48:

score: 8
Accepted
time: 78ms
memory: 16616kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
199979 200000
-1 0 1 1 1 1 1 1 1 1 1 1 11 11 1 11 11 11 11 11 11 11 0 22 23 23 23 23 23 23 23 23 23 23 33 22 35 36 36 36 36 36 36 36 36 38 38 38 35 48 49 49 49 49 49 49 49 53 53 48 59 60 60 60 60 60 59 66 67 67 67 67 67 67 67 67 67 67 73 71 66 80 81 81 81 81 81 81 81...

output:

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

result:

ok 

Test #49:

score: 8
Accepted
time: 107ms
memory: 15064kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
184863 200000
-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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #50:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1987 200000
-1 0 1 1 1 1 1 1 1 1 1 1 6 1 6 6 6 6 6 0 19 20 20 20 20 20 20 20 22 27 27 27 27 19 33 34 34 34 34 34 34 34 34 34 34 40 40 40 40 40 40 40 40 40 33 54 55 55 55 55 55 55 55 54 63 64 64 64 64 64 64 66 64 66 63 74 75 75 75 75 75 75 75 75 75 75 76 79 79 79 79 7...

output:

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

result:

ok 

Test #51:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1825 200000
-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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 1 62 62 62 62 62 62 62 62 62 62 62 62 62 62...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #52:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
186 500
-1 0 1 1 1 1 1 1 1 1 1 1 6 6 6 6 6 6 6 0 19 20 20 20 20 20 20 20 20 20 19 30 31 31 31 31 31 31 31 31 31 33 33 33 33 33 33 33 33 33 30 50 51 51 51 51 51 51 51 51 57 57 50 62 63 63 63 63 63 63 63 63 62 72 73 73 73 73 73 73 73 74 79 72 83 84 84 84 84 84 84 83 91...

output:

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

result:

ok 

Test #53:

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

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
181 500
-1 0 1 1 1 1 1 1 1 1 1 6 6 1 6 6 6 6 0 18 19 19 19 19 19 19 19 19 19 24 26 18 31 32 32 32 32 32 32 32 37 37 37 37 37 31 45 46 46 46 46 46 46 46 46 46 52 52 52 52 52 45 61 62 62 62 62 62 65 65 65 62 61 72 73 73 73 73 73 76 75 76 76 76 72 84 85 85 85 85 85 85 9...

output:

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

result:

ok 

Subtask #5:

score: 14
Accepted

Dependency #1:

100%
Accepted

Test #54:

score: 14
Accepted
time: 1ms
memory: 4080kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200 500
-1 0 0 1 1 2 3 4 5 6 2 7 0 8 9 10 11 12 13 14 1 15 3 16 17 2 18 19 20 4 5 21 22 23 24 25 26 27 28 29 6 30 31 3 32 33 34 35 36 37 7 8 9 38 10 39 11 40 41 12 13 14 4 42 43 44 45 46 5 47 6 48 15 49 50 51 16 52 53 7 54 17 55 56 57 8 9 18 58 59 60 61 19 62 63 64 2...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #55:

score: 14
Accepted
time: 1ms
memory: 3784kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
195 500
-1 0 1 2 3 0 5 5 6 6 7 7 5 8 6 8 9 10 11 9 12 13 14 15 16 10 11 12 17 18 19 20 21 22 13 23 24 14 25 26 15 27 28 1 43 43 44 45 46 47 48 44 49 45 46 50 43 44 47 51 52 53 54 45 55 56 48 49 57 58 59 60 61 62 63 64 46 65 66 50 67 2 81 82 81 81 82 83 84 83 84 85 86...

output:

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

result:

ok 

Test #56:

score: 14
Accepted
time: 1ms
memory: 4092kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
190 500
-1 0 1 2 3 4 5 6 7 8 0 10 11 12 13 14 15 16 17 18 10 19 20 21 22 23 11 12 1 28 29 30 31 28 29 30 31 32 33 32 34 33 34 35 35 36 2 46 46 47 48 49 50 51 47 48 52 53 54 55 56 57 49 58 3 64 65 66 64 65 67 68 66 67 69 70 68 71 69 70 72 71 4 82 82 83 84 85 83 86 87 ...

output:

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

result:

ok 

Test #57:

score: 14
Accepted
time: 1ms
memory: 3792kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200 500
-1 0 0 1 2 1 2 3 4 5 3 6 7 4 8 5 9 6 10 7 11 12 8 9 13 10 11 12 13 14 15 14 15 16 17 16 18 17 18 19 20 21 19 20 22 21 23 22 24 23 24 25 26 25 27 26 28 27 28 29 29 30 30 31 31 32 32 33 33 34 35 36 34 37 38 35 36 37 38 39 40 39 40 41 42 43 44 41 45 42 46 47 48 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #58:

score: 14
Accepted
time: 0ms
memory: 3792kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
191 500
-1 0 1 2 1 2 3 3 4 5 6 4 7 5 6 7 8 8 9 9 10 11 10 11 12 12 13 13 14 14 15 16 17 15 18 19 20 21 16 0 39 39 40 41 40 41 42 42 43 44 43 44 45 46 45 47 46 48 49 50 47 48 49 50 51 51 52 53 54 52 55 56 57 58 53 59 54 0 77 77 78 78 79 79 80 80 81 81 82 83 84 82 85 8...

output:

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

result:

ok 

Test #59:

score: 14
Accepted
time: 0ms
memory: 3756kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
181 500
-1 0 1 1 2 3 4 5 2 6 7 3 8 4 9 5 6 7 8 0 19 20 21 19 22 23 24 20 21 25 22 23 26 27 24 28 25 0 37 37 38 38 39 40 41 42 39 40 43 41 44 42 43 44 45 0 55 55 56 56 57 57 58 59 58 60 61 59 62 63 60 64 65 0 73 73 74 75 74 76 77 78 75 79 76 77 78 79 80 80 81 0 91 91 ...

output:

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

result:

ok 

Test #60:

score: 14
Accepted
time: 1ms
memory: 4048kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200 500
-1 0 0 1 1 0 2 3 4 5 6 0 7 1 8 1 9 10 11 12 13 14 15 16 2 3 2 17 18 19 4 5 20 21 22 23 6 3 7 0 24 25 4 1 26 27 8 9 28 29 30 31 32 33 34 10 35 2 36 37 11 12 38 39 40 41 42 43 13 44 45 46 47 48 49 14 50 51 15 52 16 5 17 53 54 55 18 3 56 19 57 58 20 59 60 61 21 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #61:

score: 14
Accepted
time: 1ms
memory: 3880kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
191 500
-1 0 1 1 2 1 2 3 3 4 2 5 1 6 3 4 7 8 9 5 10 6 4 11 12 7 13 14 15 16 17 8 9 18 10 11 19 5 12 0 39 39 40 41 42 43 44 45 46 47 39 40 48 41 49 50 51 52 42 40 43 41 44 53 54 55 56 57 58 42 59 60 61 62 63 64 65 0 77 78 79 80 81 82 83 84 85 86 87 88 77 89 90 91 92 9...

output:

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

result:

ok 

Test #62:

score: 14
Accepted
time: 1ms
memory: 3792kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
190 500
-1 0 1 2 3 4 5 6 7 8 0 10 10 11 12 13 14 11 12 15 16 13 17 18 19 14 20 15 1 28 29 28 30 31 32 33 34 28 35 36 29 37 30 28 38 29 2 46 47 46 48 47 48 49 50 51 52 53 54 46 55 56 57 58 3 64 64 65 66 67 68 64 64 69 70 65 71 65 72 73 74 66 4 82 82 83 84 82 85 86 87 ...

output:

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

result:

ok 

Test #63:

score: 14
Accepted
time: 1ms
memory: 3824kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
198 500
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 0 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #64:

score: 14
Accepted
time: 1ms
memory: 4076kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
190 500
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 1 14 15 16 17 18 19 20 21 22 23 24 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 0 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 47 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 ...

output:

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

result:

ok 

Subtask #6:

score: 14
Accepted

Test #65:

score: 14
Accepted
time: 52ms
memory: 4256kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #66:

score: 14
Accepted
time: 33ms
memory: 4020kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

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

Test #67:

score: 14
Accepted
time: 21ms
memory: 4224kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

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

Test #68:

score: 14
Accepted
time: 1ms
memory: 3964kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

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

Test #69:

score: 14
Accepted
time: 48ms
memory: 4180kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #70:

score: 14
Accepted
time: 5ms
memory: 4252kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1995 2
-1 0 1 2 3 0 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

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

result:

ok 

Test #71:

score: 14
Accepted
time: 2ms
memory: 4256kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 1 0 2 3 1 4 2 5 6 7 8 9 10 11 12 3 4 5 13 14 6 15 7 16 17 18 8 9 10 19 20 11 21 12 22 23 24 25 26 13 14 27 28 29 30 15 31 16 32 33 34 17 35 36 37 18 38 39 19 40 41 20 21 42 43 44 22 23 24 25 45 46 47 26 48 49 50 27 28 51 29 30 52 53 31 54 55 32 33 34 56 5...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #72:

score: 14
Accepted
time: 2ms
memory: 3940kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1995 2
-1 0 1 2 3 0 5 5 6 6 7 8 7 9 10 8 11 12 13 14 15 9 10 16 11 12 17 13 18 19 14 15 20 21 22 16 23 24 25 17 26 27 18 28 19 29 20 21 22 30 31 32 33 34 35 36 23 37 24 38 39 40 25 41 42 43 26 27 44 45 46 47 48 49 28 29 50 51 52 53 54 55 30 56 57 58 31 32 59 60 33 34...

output:

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

result:

ok 

Test #73:

score: 14
Accepted
time: 2ms
memory: 3956kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1960 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 0 40 41 42 40 43 41 42 44 45 43 44 46 47 45 48 49 50 51 52 53 54 55 56 57 58 46 59 47 60 48 61 62 63 64 49 50 51 65 66 67 52 68 53 69 70 54 71 1 88 88...

output:

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

result:

ok 

Test #74:

score: 14
Accepted
time: 2ms
memory: 3976kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 2
-1 0 0 1 1 2 2 3 4 3 4 5 6 7 8 5 9 6 7 10 11 8 9 12 10 13 11 14 12 15 16 17 18 13 19 20 21 22 14 15 16 17 18 23 24 19 25 26 20 21 22 23 24 25 26 27 27 28 29 28 29 30 31 30 31 32 33 34 35 32 33 34 35 36 36 37 38 39 37 40 41 42 43 44 45 38 46 47 39 40 41 48 49 4...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #75:

score: 14
Accepted
time: 2ms
memory: 3920kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1991 2
-1 0 1 2 3 4 1 5 2 6 7 8 3 4 9 5 6 10 11 7 12 8 9 13 10 14 11 12 13 14 15 15 16 17 16 18 17 19 20 18 21 19 20 22 21 22 23 23 24 25 26 24 25 26 27 27 28 29 28 30 31 29 30 31 32 33 34 32 35 33 36 34 35 37 36 38 39 37 38 39 40 41 42 43 40 44 41 42 45 43 46 47 48 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #76:

score: 14
Accepted
time: 1ms
memory: 4012kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1921 2
-1 0 1 2 3 1 4 5 6 7 2 3 4 8 9 10 11 12 5 13 14 6 15 16 17 18 19 7 8 20 9 10 11 12 21 22 23 24 25 13 14 15 16 26 17 27 28 29 30 0 49 49 50 51 52 50 53 54 51 52 55 56 57 53 54 58 59 60 55 61 62 63 64 65 66 56 67 68 57 69 70 71 58 59 60 72 61 73 74 75 62 76 77 7...

output:

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

result:

ok 

Test #77:

score: 14
Accepted
time: 25ms
memory: 3972kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1998 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #78:

score: 14
Accepted
time: 7ms
memory: 3948kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1988 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #79:

score: 14
Accepted
time: 0ms
memory: 3804kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 4
0 1 1 1 2 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #80:

score: 14
Accepted
time: 0ms
memory: 4040kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 1 0 4 5
0 1 2 1 2 2 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #81:

score: 14
Accepted
time: 0ms
memory: 3864kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 4
0 2 2 2 1 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #82:

score: 14
Accepted
time: 0ms
memory: 3812kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 1 0 4 5
0 2 1 2 1 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #83:

score: 14
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 1 0 4 5
0 1 1 2 2 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #84:

score: 14
Accepted
time: 0ms
memory: 3808kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 1 2 3
0 1 2 1 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #85:

score: 14
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 1 2 3
0 2 1 2 1 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #86:

score: 14
Accepted
time: 0ms
memory: 3860kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 2 2 4
0 1 2 1 2 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #87:

score: 14
Accepted
time: 0ms
memory: 4068kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 0 1 2 2 4
0 2 1 2 1 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1 1

result:

ok 

Test #88:

score: 14
Accepted
time: 0ms
memory: 3796kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
6 2
-1 0 0 1 3 1
0 1 2 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1

result:

ok 

Test #89:

score: 14
Accepted
time: 0ms
memory: 3836kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
6 2
-1 0 0 1 3 1
0 2 1 1 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 1 1

result:

ok 

Test #90:

score: 14
Accepted
time: 0ms
memory: 3788kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 3 4 0
0 2 2 2 2 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1

result:

ok 

Test #91:

score: 14
Accepted
time: 0ms
memory: 3808kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
8 2
-1 0 1 2 3 4 0 1
0 2 2 2 2 2 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1

result:

ok 

Test #92:

score: 14
Accepted
time: 0ms
memory: 3780kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 5
0 1 1 2 1 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 0 1 1 1 1 1

result:

ok 

Test #93:

score: 14
Accepted
time: 0ms
memory: 3784kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
7 2
-1 0 1 2 0 4 5
0 1 1 1 1 1 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1 1 0 1 1

result:

ok 

Subtask #7:

score: 12
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Test #94:

score: 12
Accepted
time: 19ms
memory: 3940kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 8...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #95:

score: 12
Accepted
time: 4ms
memory: 3936kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1995 200000
-1 0 1 2 3 0 5 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86...

output:

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

result:

ok 

Test #96:

score: 12
Accepted
time: 2ms
memory: 4256kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 200000
-1 0 0 0 1 2 3 4 1 0 5 6 2 7 8 1 9 10 3 11 12 4 13 14 2 15 16 1 17 18 2 5 3 19 3 20 21 22 23 6 4 24 7 25 26 27 28 5 8 6 29 30 31 9 32 10 33 34 7 11 4 12 13 35 0 36 14 37 38 39 15 5 40 6 8 9 41 42 16 43 44 17 45 18 46 47 48 49 10 50 1 51 52 11 53 54 55 19 ...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #97:

score: 12
Accepted
time: 2ms
memory: 4188kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1995 200000
-1 0 1 2 3 0 5 5 5 5 6 7 6 8 9 10 7 11 8 12 9 13 14 15 16 10 17 11 18 12 13 19 14 6 20 15 21 22 16 23 24 25 5 26 17 27 28 29 30 18 19 20 21 31 32 33 22 23 34 6 35 36 37 7 38 39 40 24 41 42 43 7 44 45 46 47 48 49 25 26 50 51 52 53 54 27 55 56 28 57 58 59 6...

output:

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

result:

ok 

Test #98:

score: 12
Accepted
time: 2ms
memory: 3928kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1960 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 0 40 40 41 42 43 40 44 45 46 47 48 49 50 51 52 53 54 41 40 42 40 55 56 43 57 58 59 60 61 44 45 62 46 47 63 64 48 65 41 66 42 49 67 68 50 51 69 1 ...

output:

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

result:

ok 

Test #99:

score: 12
Accepted
time: 2ms
memory: 4288kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
2000 200000
-1 0 0 1 2 1 3 0 0 0 1 2 1 1 2 2 2 3 3 4 4 3 5 3 6 7 4 4 5 5 6 7 8 9 4 5 6 5 7 10 8 11 6 7 6 8 8 9 9 7 10 10 11 8 9 9 12 11 10 12 13 14 13 11 14 12 15 10 12 11 13 15 13 14 14 15 16 16 15 12 16 17 17 16 17 18 18 18 19 13 19 19 20 17 21 22 18 20 19 14 20 20...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #100:

score: 12
Accepted
time: 2ms
memory: 4168kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1991 200000
-1 0 1 1 2 1 1 2 3 2 3 3 4 5 2 4 4 5 3 6 4 5 7 6 8 7 9 5 8 6 10 11 12 6 7 7 8 8 13 9 9 10 9 10 11 12 11 12 13 14 14 15 13 15 16 14 15 17 18 16 17 16 17 10 19 18 19 20 20 21 18 21 19 20 21 22 23 24 25 22 23 24 26 27 22 25 11 12 13 14 15 26 27 28 16 17 29 3...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #101:

score: 12
Accepted
time: 0ms
memory: 4000kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1921 200000
-1 0 1 1 1 2 3 4 5 2 6 7 3 4 8 9 5 2 3 6 4 10 7 8 5 6 9 10 11 11 12 7 13 14 8 15 16 12 9 17 13 10 11 12 18 14 13 14 15 0 49 50 49 49 50 51 51 50 52 53 51 52 54 55 56 53 52 57 53 54 58 59 55 54 56 55 57 60 61 58 62 56 59 63 60 61 62 63 64 64 65 65 57 58 66...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 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 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #102:

score: 12
Accepted
time: 25ms
memory: 4268kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1998 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 8...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #103:

score: 12
Accepted
time: 7ms
memory: 4040kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
1988 200000
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 8...

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 

Test #104:

score: 12
Accepted
time: 0ms
memory: 3784kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 0
0 1 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1

result:

ok 

Test #105:

score: 12
Accepted
time: 0ms
memory: 4032kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 0
0 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1

result:

ok 

Test #106:

score: 12
Accepted
time: 0ms
memory: 3784kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 1
0 2 2

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
1 1 1

result:

ok 

Test #107:

score: 12
Accepted
time: 0ms
memory: 3740kb

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
3 2
-1 0 1
0 2 1

output:

p89vHUOQJ7iyHtdrgGXzKx8iRtXLL6wH
OK
0 1 1

result:

ok 

Subtask #8:

score: 0
Time Limit Exceeded

Dependency #6:

100%
Accepted

Test #108:

score: 0
Time Limit Exceeded

input:

j2DRV0nYbs0y1xUYUGaiqtOKUU9vM9zi
200000 2
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 8...

output:


result:


Subtask #9:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%