QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#46959#4562. Prisoner Challengezhoukangyang#100 ✓9ms20084kbC++112.1kb2022-09-03 11:21:042024-05-26 01:07:16

Judging History

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

  • [2024-05-26 01:07:16]
  • 评测
  • 测评结果:100
  • 用时:9ms
  • 内存:20084kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-03 11:21:04]
  • 提交

answer

#include<bits/stdc++.h>
#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 ll long long 
#define vi vector < int > 
#define sz(a) ((int) (a).size())
#define me(a, x) memset(a, x, sizeof(a))
using namespace std;
const int N = 1e5 + 7;
int a[N], col[N][20], cc[N][20], P[20];
int n, d;
void solve(int l, int r, int t, int v) {
	if(l > r) return ;
	L(i, l, r) col[i][t] = cc[i][t] = v;
	d = max(d, t), P[t] = max(P[t], v + 1);
	L(a, t, 12) cc[l][a] = -1, cc[r][a] = -2;
	++l, --r;
	if(l > r) return ;
	int len = r - l + 1;
	int a = (len + 2) / 3;
	int b = (len + 1) / 3;
	int c = len / 3;
	if(len == 2) a = 2, b = 0;
	if(len == 3) a = 2, b = 1, c = 0;
	if(len == 4) a = b = 2, c = 0;
	a += l, b += a, c += b;
	solve(l, a - 1, t + 1, 0);
	solve(a, b - 1, t + 1, 1);
	solve(b, c - 1, t + 1, 2);
}

void init() {
	me(col, -1), me(cc, -1);
	solve(1, n, 0, 0);
}

vector < vi > devise_strategy(int xn) {
	n = xn;
	int op = 0;
	vector < vi > T;
	init();
	P[0] = 1;
	int lim = 0;
//	L(i, 0, d) cout << P[i] << ' ';
//	cout << '\n';
	L(i, 0, d) {
		vi f(xn + 1);
		L(t, 0, P[i] - 1) {
			f[0] = op;
			L(o, 1, xn) {
				int qwq = cc[o][i];
				if(col[o][i] >= 0 && col[o][i] != t) {
					if(col[o][i] < t) {
						// op lose. 
						f[o] = op == 0 ? -1 : -2;
					} else if(col[o][i] > t) {
						// op win. 
						f[o] = op == 0 ? -2 : -1;
					}
					continue;
				}
				if(qwq == -1) {
					f[o] = op == 0 ? -1 : -2;
					continue ;
				} 
				if(qwq == -2) {
					f[o] = op == 0 ? -2 : -1;
					continue ;
				} 
				f[o] = lim + col[o][i + 1] + 1;
			}
			T.emplace_back(f);
		}
		op ^= 1;
		lim += P[i + 1];
	} 
	return T;
}

//int Get(int x) {
//	x -= 2;
//	if(x <= 0) return 0;
//	if(x <= 4) return 2;
//	return Get((x + 2) / 3) + 3;
//}

//int main() {
////	cout << Get(5000) << '\n';
//	ios :: sync_with_stdio(false);
//	cin.tie(0); cout.tie(0);
//	cout << sz(devise_strategy(5000)) << '\n';
////	auto x = devise_strategy();
////	for(auto u : x) {
////		for(auto w : u) cout << w << ' ';
////		cout << '\n';
////	}
//	return 0;
//}

详细

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 0ms
memory: 19460kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
0
0 -1 -2

result:

ok 

Test #2:

score: 5
Accepted
time: 3ms
memory: 19460kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
1
0 -1 1 -2
1 -2 -1 -1

result:

ok 

Test #3:

score: 5
Accepted
time: 0ms
memory: 19752kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
243 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
13
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 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 2 2 2 ...

result:

ok 

Test #4:

score: 5
Accepted
time: 0ms
memory: 19480kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
256 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
13
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 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 ...

result:

ok 

Test #5:

score: 5
Accepted
time: 0ms
memory: 19428kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
499 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
14
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 ...

result:

ok 

Test #6:

score: 5
Accepted
time: 0ms
memory: 19512kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
500 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
14
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 ...

result:

ok 

Test #7:

score: 5
Accepted
time: 0ms
memory: 19436kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
29 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
7
0 -1 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 -2
1 -2 -2 4 4 4 5 5 6 6 -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 4 4 4 5 5 6 6 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
1 -2 -2 -2 -2 -2 -2 -2 -2 -2...

result:

ok 

Test #8:

score: 5
Accepted
time: 0ms
memory: 19768kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
380 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
13
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 ...

result:

ok 

Test #9:

score: 5
Accepted
time: 3ms
memory: 19532kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
411 1

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
14
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 ...

result:

ok 

Subtask #2:

score: 5
Accepted

Test #10:

score: 5
Accepted
time: 3ms
memory: 19508kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
0
0 -1 -2

result:

ok 

Test #11:

score: 5
Accepted
time: 0ms
memory: 19400kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
1
0 -1 1 -2
1 -2 -1 -1

result:

ok 

Test #12:

score: 5
Accepted
time: 0ms
memory: 19764kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
243 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
13
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 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 2 2 2 ...

result:

ok 

Test #13:

score: 5
Accepted
time: 0ms
memory: 19460kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
256 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
13
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 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 ...

result:

ok 

Test #14:

score: 5
Accepted
time: 0ms
memory: 19736kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
499 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
14
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 ...

result:

ok 

Test #15:

score: 5
Accepted
time: 0ms
memory: 19480kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
500 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
14
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 ...

result:

ok 

Test #16:

score: 5
Accepted
time: 7ms
memory: 19440kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
12 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
4
0 -1 1 1 1 1 2 2 2 3 3 3 -2
1 -2 -2 4 4 -1 -1 -1 -1 -1 -1 -1 -1
1 -2 -2 -2 -2 -2 -2 4 -1 -1 -1 -1 -1
1 -2 -2 -2 -2 -2 -2 -2 -2 -2 4 -1 -1
0 -1 -1 -1 -2 -2 -1 -2 -2 -1 -2 -2 -2

result:

ok 

Test #17:

score: 5
Accepted
time: 0ms
memory: 19448kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
138 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
11
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 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 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 3 3 3 3 3 3 3 3 3 3 3 3 ...

result:

ok 

Test #18:

score: 5
Accepted
time: 0ms
memory: 19472kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
469 2

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
14
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 ...

result:

ok 

Subtask #3:

score: 90
Accepted

Test #19:

score: 90
Accepted
time: 0ms
memory: 19520kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
0
0 -1 -2

result:

ok 

Test #20:

score: 90
Accepted
time: 6ms
memory: 19440kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
1
0 -1 1 -2
1 -2 -1 -1

result:

ok 

Test #21:

score: 90
Accepted
time: 0ms
memory: 19576kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2187 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
19
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 ...

result:

ok 

Test #22:

score: 90
Accepted
time: 7ms
memory: 19852kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
4096 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 ...

result:

ok 

Test #23:

score: 90
Accepted
time: 9ms
memory: 19884kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
4999 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 ...

result:

ok 

Test #24:

score: 90
Accepted
time: 8ms
memory: 19848kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
5000 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 ...

result:

ok 

Test #25:

score: 90
Accepted
time: 6ms
memory: 19448kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
22 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
6
0 -1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 3 -2
1 -2 -2 4 4 5 5 6 -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 4 4 5 5 6 -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 4 4 5 5 -1 -1
0 -1 -1 -1 -2 -2...

result:

ok 

Test #26:

score: 90
Accepted
time: 0ms
memory: 19460kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
376 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
13
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 ...

result:

ok 

Test #27:

score: 90
Accepted
time: 3ms
memory: 19780kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
662 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
15
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 ...

result:

ok 

Test #28:

score: 90
Accepted
time: 0ms
memory: 19856kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
2010 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
18
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 ...

result:

ok 

Test #29:

score: 90
Accepted
time: 3ms
memory: 20084kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
4030 3

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
20
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 ...

result:

ok 

Test #30:

score: 90
Accepted
time: 0ms
memory: 19708kb

input:

9bbd7c649d0a9529ee32e00a6b96ee2f93e5b138
3 0

output:

d42f2a420c2a91c29a00736354e52427eecfabae
OK
1
0 -1 1 -2
1 -2 -1 -1

result:

ok