QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#877348#9682. nim 游戏Survivor_winner2 611ms179092kbC++145.0kb2025-01-31 21:29:382025-01-31 21:29:38

Judging History

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

  • [2025-01-31 21:29:38]
  • 评测
  • 测评结果:2
  • 用时:611ms
  • 内存:179092kb
  • [2025-01-31 21:29:38]
  • 提交

answer

// superyijin AK IOI
// wangsiyuanZP AK IOI
// #pragma GCC optimize(2)
// #pragma GCC optimize(3)
#include <bits/stdc++.h>
#define int long long
#define ll long long
#define ull unsigned long long
#define i128 __int128
#define ld long double
#define pii pair<int, int>
#define vi vector<int>
#define vpii vector<pair<int, int>>
#define pb push_back
#define m_p make_pair
#define fi first
#define se second
#define pcnt __builtin_popcountll
using namespace std;
const int inf = (sizeof(int) == 4 ? 0x3f3f3f3f : 0x3f3f3f3f3f3f3f3f);
int mod = 998244353;
const ld eps = 1e-7;
void chkmin(int &x, int y) { x = min(x, y); }
void chkmax(int &x, int y) { x = max(x, y); }
void inc(int &x, int y) { x = (x + y >= mod ? x + y - mod : x + y); }
void dec(int &x, int y) { x = (x - y < 0 ? x - y + mod : x - y); }
int ksm(int a, int b)
{
	int t = 1;
	while (b)
	{
		if (b & 1) t = t * a % mod;
		a = a * a % mod, b >>= 1;
	}
	return t;
}
int ksm(int a, int b, int p)
{
	int t = 1;
	while (b)
	{
		if (b & 1) t = t * a % p;
		a = a * a % p, b >>= 1;
	}
	return t;
}
bool Mbe;
const int N = 3e5 + 10;
struct Bit
{
	int t[N];
	Bit() { memset(t, 0, sizeof(t)); }
	int lowbit(int x) { return x & -x; }
	void add(int x, int y) { while (x < N) t[x] += y, x += lowbit(x); }
	int sum(int x)
	{
		int ans = 0;
		while (x >= 1) ans += t[x], x -= lowbit(x);
		return ans;
	}
};
int fac[N], invfac[N];
void init(int n)
{
	fac[0] = 1;
	for (int i = 1; i <= n; i++) fac[i] = fac[i - 1] * i % mod;
	invfac[n] = ksm(fac[n], mod - 2);
	for (int i = n - 1; i >= 0; i--) invfac[i] = invfac[i + 1] * (i + 1) % mod;
}
int A(int n, int m)
{
	if (m < 0 || m > n) return 0;
	return fac[n] * invfac[n - m] % mod;
}
int C(int n, int m)
{
	if (m < 0 || m > n) return 0;
	return fac[n] * invfac[m] % mod * invfac[n - m] % mod;
}
int calc(int now, vi vec)
{
	int sum = 0;
	while (now)
	{
		int x = __lg(now);
		for (auto &i : vec) i &= (1ll << x + 1) - 1;
		sort(vec.begin(), vec.end());
		int pos = lower_bound(vec.begin(), vec.end(), (1ll << x)) - vec.begin() - 1;
		if (pos < 0) return inf;
		now ^= (1ll << x) ^ vec[pos], sum += (1ll << x) - vec[pos];
		vec[pos] = 0;
	}
	return sum;
}
int n, m, ans;
int id[60][100010];
vpii v[60];
vector<vpii> V;
int check(int now, vpii vec)
{
	int sum = 0;
	while (now)
	{
		int x = __lg(now);
		vector<bool> f(min((int)v[x].size(), 65ll));
		for (auto i : vec) if (id[x][i.fi] < 65) f[id[x][i.fi]] = true;
		bool flag = false; 
		for (int i = 0; i < v[x].size() && i < 65; i++)
		{
			if (f[i]) continue;
			now ^= (1ll << x) ^ v[x][i].fi, sum += (1ll << x) - v[x][i].fi;
			vec.pb({v[x][i].se, (1ll << x) - v[x][i].fi});
			flag = true;
			break;
		}
		if (!flag) now ^= (1ll << x), sum += (1ll << x);
	}
	return sum;
}
void solve(int now, int sum, vpii vec)
{
	if (V.size() == m) return;
	if (check(now, vec) + sum > ans) return;
	if (now == 0)
	{
		V.pb(vec);
		return;
	}
	int x = __lg(now);
	vi vid;
	for (auto i : vec) vid.pb(id[x][i.fi]);
	sort(vid.begin(), vid.end());
	int pp = 0;
	for (int i = 0; i < v[x].size(); i++)
	{
		if (pp < vid.size() && vid[pp] == i)
		{
			pp++;
			continue;
		}
		int w = now ^ (1ll << x) ^ v[x][i].fi, ws = sum + (1ll << x) - v[x][i].fi;
		vec.pb({v[x][i].se, (1ll << x) - v[x][i].fi});
		solve(w, ws, vec);
		vec.pop_back();
		if (V.size() == m) return;
	}
	for (int i = 0; i < vec.size(); i++)
	{
		int w = now ^ (1ll << x), ws = now + (1ll << x);
		vec[i].se += (1ll << x);
		solve(w, ws, vec);
		vec[i].se -= (1ll << x);
		if (V.size() == m) return;
	}
}
int a[100010];
void Main(int c)
{
	V.clear();
	cin >> n >> m;
	int now = 0;
	vi vec;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		now ^= a[i];
		vec.pb(a[i]); 
	}
	for (int x = 59; x >= 0; x--)
	{
		v[x].clear();
		for (int i = 1; i <= n; i++) id[x][i] = inf;
		for (int i = 1; i <= n; i++) if (!((a[i] >> x) & 1)) v[x].pb({a[i] & ((1 << x) - 1), i});
		sort(v[x].begin(), v[x].end());
		reverse(v[x].begin(), v[x].end());
		for (int i = 0; i < v[x].size(); i++) id[x][v[x][i].se] = i;
	}
	ans = calc(now, vec);
	if (ans == inf)
	{
		int p = __lg(now);
		for (int x = 60; x > p; x--)
		{
			vi v = vec;
			for (auto &i : v) i &= (1ll << x + 1) - 1;
			sort(v.begin(), v.end());
			int pos = lower_bound(v.begin(), v.end(), (1ll << x)) - v.begin() - 1;
			if (pos < 1) continue;
			int w = now ^ v[pos] ^ v[pos - 1], ws = (1ll << x + 1) - v[pos] - v[pos - 1];
			v[pos] = v[pos - 1] = 0;
			ans = min(ans, ws + calc(w, v));
		}
	}
	else solve(now, 0, {});
	cout << ans << '\n';
	cout << V.size() << '\n';
	for (auto v : V)
	{
		cout << v.size() << '\n';
		for (auto i : v) cout << i.fi << " ";
		cout << '\n';
		for (auto i : v) cout << i.se << " ";
		cout << '\n';
	}
}
bool Med;
signed main()
{
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	cerr << (&Mbe - &Med) / 1048576.0 << "MB" << endl;
	int c, T;
	cin >> c >> T;
	while (T--) Main(c);
	return 0;
}
// superyijin AK IOI
// wangsiyuanZP AK IOI

详细


Pretests

Pretest #1:

score: 2
Acceptable Answer
time: 36ms
memory: 53348kb

input:

1 10000
2 1
787709928 658090405
2 1
508859442 320865978
2 1
901516660 1071318821
2 1
924326675 330656846
2 1
556507192 599101864
2 1
518528812 842021415
2 1
153781736 213270767
2 1
161460204 140517709
2 1
344895823 339053034
2 1
76824343 446590781
2 1
943442122 128864577
2 1
186128196 166832232
2 1
...

output:

129619523
0
187993464
0
169802161
0
593669829
0
42594672
0
323492603
0
59489031
1
1
1 
59489031 
20942495
1
1
2 
20942495 
5842789
1
1
2 
5842789 
369766438
1
1
1 
369766438 
814577545
1
1
2 
814577545 
19295964
0
441833213
1
1
2 
441833213 
682938449
0
138747082
1
1
1 
138747082 
450474039
0
148427...

result:

points 0.5 right answer but not right solutions at 1th solution

Pretest #2:

score: 0
Wrong Answer
time: 0ms
memory: 53224kb

input:

2 5
5 2000
0 1 15 5 8
5 2000
0 13 11 14 7
5 2000
0 1 1 2 3
5 2000
0 7 4 4 9
5 2000
0 13 10 12 8

output:

1
2
1
4 
1 
1
2 
1 
1
1
1
5 
1 
1
2
1
4 
1 
1
1 
1 
2
4
2
2 4 
1 1 
2
2 3 
1 1 
2
2 1 
1 1 
1
2 
2 
1
1
1
2 
1 

result:

wrong answer wront output format with x_i at test case 4

Pretest #3:

score: 0
Wrong Answer
time: 0ms
memory: 51292kb

input:

3 5
5 2000
0 12 14 13 4
5 2000
0 14 5 5 11
5 2000
0 12 3 0 1
5 2000
0 8 5 9 11
5 2000
0 8 7 1 2

output:

9
14
3
5 1 4 
4 4 1 
3
5 1 3 
6 4 1 
3
5 1 2 
6 4 1 
2
5 1 
7 4 
2
5 1 
6 5 
3
5 1 3 
4 6 1 
3
5 1 2 
4 6 1 
2
5 1 
5 6 
2
5 1 
4 7 
2
1 4 
8 1 
2
1 5 
10 1 
2
1 3 
10 1 
2
1 2 
10 1 
1
1 
11 
3
9
3
5 4 2 
1 1 1 
3
5 4 1 
1 1 1 
2
5 4 
2 1 
2
5 4 
1 2 
3
5 3 2 
1 1 1 
3
5 3 1 
1 1 1 
2
5 3 
2 1 
2
5...

result:

wrong answer wront output format with x_i at test case 1

Pretest #4:

score: 0
Wrong Answer
time: 0ms
memory: 51176kb

input:

4 5
5 2000
0 0 3 13 5
5 2000
0 9 10 14 3
5 2000
0 4 7 10 3
5 2000
0 9 14 5 0
5 2000
0 6 4 7 12

output:

5
5
3
5 3 2 
3 1 1 
3
5 3 1 
3 1 1 
2
5 3 
4 1 
2
5 3 
3 2 
1
3 
5 
8
10
3
5 3 2 
5 2 1 
3
5 3 4 
7 2 1 
3
5 3 1 
7 2 1 
2
5 3 
8 2 
2
5 3 
7 3 
3
5 3 4 
5 4 1 
3
5 3 1 
5 4 1 
2
5 3 
6 4 
2
5 3 
5 5 
2
5 2 
5 3 
4
4
3
3 5 2 
1 1 2 
3
3 5 1 
1 1 2 
2
3 5 
3 1 
2
3 5 
1 3 
2
10
2
4 5 
1 1 
2
4 3 
1 1...

result:

wrong answer wront output format with x_i at test case 1

Pretest #5:

score: 0
Wrong Answer
time: 1ms
memory: 51440kb

input:

5 5
6 2000
0 924 738 482 642 735
6 2000
0 506 297 82 577 913
6 2000
0 520 847 369 136 119
6 2000
0 690 849 528 740 840
6 2000
0 121 51 176 500 435

output:

189
1320
5
1 2 5 4 3 
131 36 14 6 2 
5
1 2 5 4 3 
130 37 14 6 2 
5
1 2 5 4 3 
130 36 15 6 2 
5
1 2 5 4 3 
130 36 14 7 2 
5
1 2 5 4 3 
130 36 14 6 3 
5
1 2 5 4 3 
129 38 14 6 2 
5
1 2 5 4 3 
128 39 14 6 2 
5
1 2 5 4 3 
128 38 15 6 2 
5
1 2 5 4 3 
128 38 14 7 2 
5
1 2 5 4 3 
128 38 14 6 3 
5
1 2 5 4 3...

result:

wrong answer wront output format with x_i at test case 1

Pretest #6:

score: 0
Wrong Answer
time: 0ms
memory: 51176kb

input:

6 5
6 2000
0 611 108 95 972 21
6 2000
0 477 6 212 751 342
6 2000
0 131 78 345 512 551
6 2000
0 606 560 666 251 1020
6 2000
0 837 1013 823 371 987

output:

183
54
5
3 2 1 6 5 
148 29 4 1 1 
4
3 2 1 6 
149 29 4 1 
4
3 2 1 6 
148 30 4 1 
4
3 2 1 6 
148 29 5 1 
4
3 2 1 6 
148 29 4 2 
4
3 2 1 5 
148 29 4 2 
3
3 2 1 
150 29 4 
3
3 2 1 
148 31 4 
3
3 2 1 
148 29 6 
4
3 2 6 5 
152 29 1 1 
4
3 2 6 1 
152 29 1 1 
3
3 2 6 
153 29 1 
3
3 2 6 
152 30 1 
3
3 2 6 
1...

result:

wrong answer wront output format with x_i at test case 1

Pretest #7:

score: 0
Wrong Answer
time: 0ms
memory: 53220kb

input:

7 5
6 2000
0 843 555 227 498 625
6 2000
0 365 658 849 181 373
6 2000
0 784 493 983 343 427
6 2000
0 628 848 762 675 423
6 2000
0 714 409 429 732 164

output:

58
128
5
5 4 3 6 1 
15 29 5 7 2 
5
5 4 3 6 1 
14 30 5 7 2 
5
5 4 3 6 1 
14 29 6 7 2 
5
5 4 3 6 1 
14 29 5 8 2 
5
5 4 3 6 1 
14 29 5 7 3 
5
5 4 3 6 1 
16 29 5 7 1 
4
5 4 3 6 
17 29 5 7 
4
5 4 3 6 
16 30 5 7 
4
5 4 3 6 
16 29 6 7 
4
5 4 3 6 
16 29 5 8 
5
5 4 3 6 1 
14 31 5 7 1 
4
5 4 3 6 
15 31 5 7 
4...

result:

wrong answer wront output format with x_i at test case 1

Pretest #8:

score: 0
Wrong Answer
time: 467ms
memory: 178240kb

input:

8 272
100000 100
268435456 16 2 16 256 2 131072 1 536870912 16 134217728 4096 2048 8 512 8388608 33554432 128 1 134217728 256 2 16777216 256 4194304 1048576 536870912 262144 16 67108864 536870912 268435456 1024 2097152 2 128 512 512 512 4096 8388608 524288 2048 268435456 16 16384 512 4096 8192 16 65...

output:

200828637
100
18
99982 99931 99959 99997 99990 99999 99926 100000 99890 99995 99955 99964 99978 99975 99994 99981 99919 99983 
134217728 33554432 16777216 8388608 4194304 2097152 1048576 524288 16384 8192 1024 512 128 64 16 8 4 1 
18
99982 99931 99959 99997 99990 99999 99926 100000 99890 99995 99955...

result:

wrong answer wront output format with x_i at test case 1

Pretest #9:

score: 0
Wrong Answer
time: 473ms
memory: 178948kb

input:

9 264
100000 100
64 32 4 67108864 4194304 262144 2048 1 8192 536870912 268435456 16 33554432 128 1048576 32768 2097152 536870912 2 1 8 64 1048576 4096 16777216 8192 2 16384 2048 2097152 16384 32 131072 2097152 2048 131072 134217728 134217728 4096 4096 32768 1048576 1024 268435456 2097152 16384 33554...

output:

341268837
100
15
99947 99941 99979 99961 99889 99969 99999 99981 99998 99992 99982 100000 99991 99989 99928 
268435456 67108864 4194304 1048576 262144 131072 65536 16384 4096 2048 256 64 32 4 1 
15
99947 99941 99979 99961 99889 99969 99999 99981 99998 99992 99982 100000 99991 99989 99926 
268435456 ...

result:

wrong answer wront output format with x_i at test case 1

Pretest #10:

score: 0
Wrong Answer
time: 462ms
memory: 179092kb

input:

10 260
100000 100
2097152 2048 16777216 32 65536 262144 16777216 16384 524288 8192 1 2 1 32768 134217728 131072 2097152 1024 64 8388608 131072 4194304 2 262144 2 512 65536 2 262144 1 1 512 33554432 262144 32 8388608 1 16777216 524288 4 128 512 134217728 1 67108864 536870912 512 65536 32768 8388608 1...

output:

156152625
100
14
99998 99968 99961 99995 99970 99921 99954 99997 99993 99978 99991 99999 99951 99948 
134217728 16777216 4194304 524288 262144 131072 32768 8192 4096 512 256 32 16 1 
14
99998 99968 99961 99995 99970 99921 99954 99997 99993 99978 99991 99999 99951 99934 
134217728 16777216 4194304 52...

result:

wrong answer wront output format with x_i at test case 1

Pretest #11:

score: 0
Wrong Answer
time: 600ms
memory: 139436kb

input:

11 1926
100000 1
0 212593154 1052140456 972928282 462369044 673421356 1030921469 775492985 523349355 1069594143 190488188 492043456 733126324 341798699 724636365 947318175 262485282 931417678 663669259 740799776 535456704 684181464 19065576 53174255 514941440 670957241 988117825 629697943 45145107 1...

output:

166
1
12
24063 55418 84218 51529 90142 90009 98561 99076 99941 99992 99986 100000 
50 6 101 1 1 1 1 1 1 1 1 1 
3507
1
9
19 26 9 16 10 8 24 15 27 
1920 960 444 124 40 16 1 1 1 
330
1
2
2 1 
266 64 
2702
1
2
3 1 
2190 512 
29425584
1
4
5 9 8 7 
29359096 65496 988 4 
4458735
1
9
24 20 2 19 5 7 32 38 6 ...

result:

wrong answer wront output format with x_i at test case 1

Pretest #12:

score: 0
Wrong Answer
time: 593ms
memory: 139056kb

input:

12 2322
100000 1
0 7039776 731926398 236886500 253555357 170069043 850149498 316268635 795618622 1065678481 633285758 1009207086 237836472 1017789866 399181873 324785167 527514687 676377746 338198269 270887526 278879561 639366360 646568377 35830334 462432910 876996649 282011992 376880056 871143466 6...

output:

34074
1
12
55827 34296 17832 41131 88852 54949 81207 99179 99054 98562 99431 99897 
33440 287 328 9 3 1 1 1 1 1 1 1 
9706
1
9
15 26 18 7 29 4 27 20 30 
8192 1024 256 128 64 32 8 1 1 
159051
1
9
28 30 22 8 7 29 23 20 27 
131072 16384 8192 3072 256 64 8 2 1 
28903264
1
5
6 5 3 7 4 
25133056 3637248 13...

result:

wrong answer wront output format with x_i at test case 1

Pretest #13:

score: 0
Wrong Answer
time: 611ms
memory: 139316kb

input:

13 2464
100000 1
0 427935372 551832889 844721265 648958227 58702839 98231989 67300751 1070455997 255697378 699971877 1056963469 632702252 896835770 545070997 374682484 333464439 140377201 550440744 704064530 917272389 331841130 755945696 883819791 896333287 197663164 1004357948 335423689 95692127 34...

output:

5015
1
18
69119 71138 54590 38387 57645 76661 44635 36654 83914 80009 99475 98490 99634 99877 100000 99998 99999 99997 
3294 1412 191 45 53 6 2 2 1 1 1 1 1 1 1 1 1 1 
40747082
1
18
375 210 401 4 284 319 315 282 747 415 712 572 682 414 706 742 757 761 
29360128 6291456 4128768 491520 262112 131072 65...

result:

wrong answer wront output format with x_i at test case 1

Pretest #14:

score: 0
Wrong Answer
time: 2ms
memory: 53944kb

input:

14 23
1000 10
0 698723699 153465147 73111165 241423619 281436251 113788324 332818071 542687168 77217995 707859065 70032469 945739237 152178890 73308725 1024104741 39038522 68449065 817070146 484673194 548054722 17751150 1033084930 799709329 351409876 1014395268 477743523 926399631 141641436 10162229...

output:

2629849
10
14
998 39 397 807 574 514 938 953 917 556 748 875 923 999 
1280654 1311479 33161 3803 428 112 155 48 1 4 1 1 1 1 
14
998 39 397 807 574 514 938 953 917 556 748 875 923 995 
1280654 1311479 33161 3803 428 112 155 48 1 4 1 1 1 1 
14
998 39 397 807 574 514 938 953 917 556 748 875 923 978 
12...

result:

wrong answer wront output format with x_i at test case 1

Pretest #15:

score: 0
Wrong Answer
time: 4ms
memory: 54056kb

input:

15 20
1000 10
0 325140143 399467215 271742503 190711881 796467699 212013868 800948731 598735180 276851093 459249598 988722552 598611576 105484598 808958849 841464615 178027765 508254895 206994337 1072632121 1049525925 403545743 729066403 167006626 616418294 1054659905 183353134 221931747 696125686 6...

output:

132910
10
10
824 902 175 366 542 706 707 756 997 999 
89186 36788 6482 136 280 14 6 16 1 1 
10
824 902 175 366 542 706 707 756 997 991 
89186 36788 6482 136 280 14 6 16 1 1 
10
824 902 175 366 542 706 707 756 997 989 
89186 36788 6482 136 280 14 6 16 1 1 
10
824 902 175 366 542 706 707 756 997 988 
...

result:

wrong answer wront output format with x_i at test case 1

Pretest #16:

score: 0
Wrong Answer
time: 7ms
memory: 52308kb

input:

16 13
1000 10
0 482035639 676392463 177349717 883879216 637330885 636356465 296234635 413153479 243419329 335379052 28971145 245253558 649873071 989738887 859470495 546547468 165357700 205836231 930726901 836955479 527409688 413040184 425801996 723492123 804913055 914899671 430466328 1001437510 3421...

output:

938103
10
18
26 181 11 91 483 776 582 118 746 302 567 291 869 965 996 993 999 1000 
393313 221826 165268 105609 42557 2062 2196 4858 169 55 183 1 1 1 1 1 1 1 
18
26 181 11 91 483 776 582 118 746 302 567 291 869 965 996 993 999 998 
393313 221826 165268 105609 42557 2062 2196 4858 169 55 183 1 1 1 1 ...

result:

wrong answer wront output format with x_i at test case 1

Pretest #17:

score: 0
Wrong Answer
time: 2ms
memory: 51840kb

input:

17 25
1000 10
0 204462620 639500437 1036012729 739663091 537559905 884930259 908629202 87714371 214733383 426959949 412554835 286343676 997368563 336872508 137649097 499408853 98787579 526714350 509336631 438105017 488897961 521760143 786808538 496422268 1006079836 855395010 204030938 325348670 4189...

output:

1515532
10
18
74 606 199 680 259 257 423 811 627 135 519 985 619 912 989 992 998 999 
708963 486260 278032 7999 28978 4148 4 589 356 180 16 1 1 1 1 1 1 1 
18
74 606 199 680 259 257 423 811 627 135 519 985 619 912 989 992 998 996 
708963 486260 278032 7999 28978 4148 4 589 356 180 16 1 1 1 1 1 1 1 
1...

result:

wrong answer wront output format with x_i at test case 1

Pretest #18:

score: 0
Wrong Answer
time: 465ms
memory: 139404kb

input:

18 235
100000 1000
0 82292805 542862389 496765580 714793373 1018727959 380589532 235510694 439236106 450402753 644037967 69084284 398499559 833754127 162045571 1073497987 905929801 414312207 964010413 690834864 244433021 782011334 138519454 409419856 431781810 1035339746 480460956 415997860 10156623...

output:

34345
1000
21
83905 96349 71125 90794 85101 643 79998 51228 79561 86749 68491 42711 47588 56705 98490 97714 99571 99563 99776 99954 99952 
24144 3773 5777 56 59 75 373 4 65 7 2 1 1 1 1 1 1 1 1 1 1 
21
83905 96349 71125 90794 85101 643 79998 51228 79561 86749 68491 42711 47588 56705 98490 97714 99571...

result:

wrong answer wront output format with x_i at test case 1

Pretest #19:

score: 0
Wrong Answer
time: 415ms
memory: 139808kb

input:

19 236
100000 1000
0 109677213 768433554 834865731 720533892 838023709 491602375 513068054 1030589833 94664107 745436908 1037219078 228408014 547804495 508518110 773484880 380678427 782156458 113943184 307779979 912132791 587642137 735393238 657215861 44405388 83221805 174662600 163585186 300009673 ...

output:

3319
1000
16
71580 94162 92540 30973 43122 2593 95275 51845 78360 99762 99938 99940 99444 99934 99958 100000 
1992 492 648 84 33 58 2 2 1 1 1 1 1 1 1 1 
16
71580 94162 92540 30973 43122 2593 95275 51845 78360 99762 99938 99940 99444 99934 99958 99999 
1992 492 648 84 33 58 2 2 1 1 1 1 1 1 1 1 
16
71...

result:

wrong answer wront output format with x_i at test case 1

Pretest #20:

score: 0
Wrong Answer
time: 449ms
memory: 138560kb

input:

20 210
100000 1000
0 550139852 961781343 290521815 952492729 457397512 357809864 204830121 1140484 170664856 470999550 1055212876 691814384 638327612 265853133 674623701 160349476 763151462 881390841 355393034 667147513 628883665 627392037 395945621 565511024 979892315 870090061 43124702 944114976 1...

output:

533
1000
17
88377 47605 54076 87756 34762 7762 74010 38665 96774 98331 99899 99888 99989 99993 99998 100000 99999 
351 98 4 53 7 9 1 1 1 1 1 1 1 1 1 1 1 
17
88377 47605 54076 87756 34762 7762 74010 38665 96774 98331 99899 99888 99989 99993 99998 100000 99997 
351 98 4 53 7 9 1 1 1 1 1 1 1 1 1 1 1 
1...

result:

wrong answer wront output format with x_i at test case 1

Pretest #21:

score: 0
Wrong Answer
time: 419ms
memory: 139204kb

input:

21 246
100000 1000
0 897255135 331582452 692933508 605776464 745133272 287951719 636521474 674882787 145593015 355040634 666511339 967360297 920416500 1010174993 220923757 1062201185 392857314 952622455 432831665 591343815 983505947 314879003 323044 876019636 3896524 753501041 48852262 176877973 104...

output:

18210
1000
14
22875 9641 27958 66606 58494 36601 21149 92166 99650 99996 99872 99998 99994 100000 
4636 10717 2126 155 331 190 47 2 1 1 1 1 1 1 
14
22875 9641 27958 66606 58494 36601 21149 92166 99650 99996 99872 99998 99994 99999 
4636 10717 2126 155 331 190 47 2 1 1 1 1 1 1 
14
22875 9641 27958 66...

result:

wrong answer wront output format with x_i at test case 1

Pretest #22:

score: 0
Wrong Answer
time: 446ms
memory: 141060kb

input:

22 237
99999 1000
0 19429538 32580338 239047420 111765496 237262980 10571876 197851450 233191405 192728811 23616992 2112605 201810362 35237428 102317792 1287284 107825938 219438710 182319519 243718852 90090242 90138990 118813262 207877046 233448598 224872276 5939550 82514558 103000114 13729014 79388...

output:

3840
1000
13
65135 42958 62264 47708 52746 62603 71044 72641 77404 99901 99898 99990 99998 
2867 31 312 469 107 6 20 22 2 1 1 1 1 
13
65135 42958 62264 47708 52746 62603 71044 72641 77404 99901 99898 99990 99997 
2867 31 312 469 107 6 20 22 2 1 1 1 1 
13
65135 42958 62264 47708 52746 62603 71044 726...

result:

wrong answer wront output format with x_i at test case 1

Pretest #23:

score: 0
Wrong Answer
time: 429ms
memory: 142164kb

input:

23 229
99999 1000
0 251252946 107619243 220631496 246783065 243267863 37598061 174732100 119356777 38068361 57156544 232667237 83660542 90081294 219829370 268237117 43024835 122172878 186256566 48858424 81564486 177620789 177890699 37297432 39654072 59706273 144598610 213246934 239565341 192674874 1...

output:

3129
1000
10
66691 73096 87117 39798 99503 99690 99926 99938 99996 99998 
3071 33 12 7 1 1 1 1 1 1 
10
66691 73096 87117 39798 99503 99690 99926 99938 99996 99995 
3071 33 12 7 1 1 1 1 1 1 
10
66691 73096 87117 39798 99503 99690 99926 99938 99996 99994 
3071 33 12 7 1 1 1 1 1 1 
10
66691 73096 87117...

result:

wrong answer wront output format with x_i at test case 1

Pretest #24:

score: 0
Wrong Answer
time: 463ms
memory: 104632kb

input:

24 295
99999 2000
0 144446187652890493 178777776597373669 235188002077979946 277503908732511739 47638688657611750 68964406333979880 151013710872842158 146243386861595119 99485082905765142 200318010185323152 282591375727049216 123011484444631758 286520503049914226 232871465119451744 18280893731725023...

output:

5526392210479
0
9460024634
0
17151
0
4127586088690318
0
2079026164092
0
7429030
5
5
1 4 2 6 3 
7322624 98239 6120 2043 4 
4
1 4 2 6 
7322628 98239 6120 2043 
4
1 4 2 6 
7322624 98243 6120 2043 
4
1 4 2 6 
7322624 98239 6124 2043 
4
1 4 2 6 
7322624 98239 6120 2047 
1370361970464
0
6747524909
0
82201...

result:

wrong answer wront output format with x_i at test case 6

Pretest #25:

score: 0
Wrong Answer
time: 461ms
memory: 104152kb

input:

25 302
99999 2000
0 158060258327551 71283336971520116 219425730293845004 160993545682455627 118267401240028100 71239693681579669 269286666497227789 93391159342185951 23853690640806525 151733498955852704 124666395764102330 67021920580696748 119814027172684125 70463976282802752 2939723111608543 127044...

output:

4114663026142
0
2335329
100
9
9 3 8 36 7 2 34 11 35 
1884160 359424 73728 15808 1968 236 3 1 1 
9
9 3 8 36 7 2 34 11 33 
1884160 359424 73728 15808 1968 236 3 1 1 
9
9 3 8 36 7 2 34 11 31 
1884160 359424 73728 15808 1968 236 3 1 1 
9
9 3 8 36 7 2 34 11 30 
1884160 359424 73728 15808 1968 236 3 1 1 
...

result:

wrong answer wront output format with x_i at test case 2


Final Tests

Test #1:

score: 2
Acceptable Answer
time: 36ms
memory: 53220kb

input:

1 10000
2 1
324097321 555675086
2 1
304655177 991244276
2 1
9980291 383616352
2 1
1071036550 795625380
2 1
682098056 68370721
2 1
969101726 685975156
2 1
973896269 354857775
2 1
196188000 606494155
2 1
754416123 467588829
2 1
495704303 558090120
2 1
618002000 491488050
2 1
741575237 9937018
2 1
1002...

output:

231577765
1
1
1 
231577765 
686589099
0
373636061
1
1
1 
373636061 
275411170
0
613727335
1
1
2 
613727335 
283126570
0
619038494
0
410306155
1
1
1 
410306155 
286827294
0
62385817
1
1
1 
62385817 
126513950
0
731638219
1
1
2 
731638219 
130065995
1
1
1 
130065995 
295114692
1
1
2 
295114692 
301034...

result:

points 0.5 right answer but not right solutions at 2th solution

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 51304kb

input:

2 5
5 2000
0 13 3 4 10
5 2000
0 3 9 1 11
5 2000
0 13 7 3 5
5 2000
0 1 13 9 2
5 2000
0 8 14 7 13

output:

0
1
0


0
1
0


2
2
2
3 5 
1 1 
2
3 2 
1 1 
3
2
2
5 1 
2 1 
1
5 
3 
2
1
2
4 5 
1 1 

result:

wrong answer wront output format with x_i at test case 3

Test #3:

score: 0
Wrong Answer
time: 0ms
memory: 53356kb

input:

3 5
5 2000
0 4 14 5 7
5 2000
0 2 15 0 12
5 2000
0 1 14 0 5
5 2000
0 13 4 12 3
5 2000
0 10 10 1 11

output:

6
9
3
5 1 4 
1 4 1 
3
5 1 3 
3 4 1 
3
5 1 2 
3 4 1 
2
5 1 
4 4 
2
5 1 
3 5 
3
5 1 3 
1 6 1 
3
5 1 2 
1 6 1 
2
5 1 
2 6 
2
5 1 
1 7 
1
4
1
5 
1 
1
4 
1 
1
2 
1 
1
1 
1 
8
27
3
5 2 4 
3 3 2 
3
5 2 1 
3 3 2 
2
5 2 
5 3 
2
5 2 
3 5 
3
5 4 2 
3 4 1 
3
5 4 3 
5 4 1 
3
5 4 1 
5 4 1 
2
5 4 
6 4 
2
5 4 
5 5 ...

result:

wrong answer wront output format with x_i at test case 1

Test #4:

score: 0
Wrong Answer
time: 0ms
memory: 51180kb

input:

4 5
5 2000
0 6 15 10 1
5 2000
0 15 0 13 10
5 2000
0 5 7 5 1
5 2000
0 13 3 2 15
5 2000
0 2 4 7 0

output:

2
5
2
5 4 
1 1 
2
5 2 
1 1 
2
5 1 
1 1 
1
5 
2 
1
1 
2 
8
2
1
3 
8 
1
1 
8 
4
2
2
5 4 
3 1 
2
5 2 
3 1 
1
1
1
2 
1 
1
4
1
5 
1 
1
3 
1 
1
2 
1 
1
1 
1 

result:

wrong answer wront output format with x_i at test case 1

Test #5:

score: 0
Wrong Answer
time: 2ms
memory: 51208kb

input:

5 5
6 2000
0 45 517 811 107 132
6 2000
0 382 576 805 419 579
6 2000
0 379 809 441 331 67
6 2000
0 565 776 959 852 383
6 2000
0 613 383 829 47 441

output:

146
32
5
6 2 5 3 1 
124 19 1 1 1 
4
6 2 5 3 
125 19 1 1 
4
6 2 5 3 
124 20 1 1 
4
6 2 5 3 
124 19 2 1 
4
6 2 5 3 
124 19 1 2 
4
6 2 5 1 
124 19 1 2 
3
6 2 5 
126 19 1 
3
6 2 5 
124 21 1 
3
6 2 5 
124 19 3 
5
6 2 4 3 1 
124 19 1 1 1 
4
6 2 4 3 
125 19 1 1 
4
6 2 4 3 
124 20 1 1 
4
6 2 4 3 
124 19 2 1...

result:

wrong answer wront output format with x_i at test case 1

Test #6:

score: 0
Wrong Answer
time: 2ms
memory: 51304kb

input:

6 5
6 2000
0 75 173 555 637 905
6 2000
0 934 118 906 367 728
6 2000
0 244 321 598 625 469
6 2000
0 573 489 24 480 459
6 2000
0 424 356 750 623 871

output:

557
2000
5
3 5 2 6 1 
342 131 53 23 8 
5
3 5 2 6 1 
341 132 53 23 8 
5
3 5 2 6 1 
341 131 54 23 8 
5
3 5 2 6 1 
341 131 53 24 8 
5
3 5 2 6 1 
341 131 53 23 9 
5
3 5 2 6 1 
340 133 53 23 8 
5
3 5 2 6 1 
339 134 53 23 8 
5
3 5 2 6 1 
339 133 54 23 8 
5
3 5 2 6 1 
339 133 53 24 8 
5
3 5 2 6 1 
339 133 ...

result:

wrong answer wront output format with x_i at test case 1

Test #7:

score: 0
Wrong Answer
time: 1ms
memory: 51308kb

input:

7 5
6 2000
0 886 972 226 813 407
6 2000
0 219 190 742 101 572
6 2000
0 590 423 516 1017 46
6 2000
0 388 807 207 205 647
6 2000
0 408 180 238 300 694

output:

176
25
5
6 4 2 5 1 
109 30 10 19 8 
5
6 4 2 5 1 
105 34 10 19 8 
5
6 4 2 5 1 
105 30 14 19 8 
5
6 4 2 5 1 
105 30 10 23 8 
5
6 4 2 5 1 
105 30 10 19 12 
5
6 4 2 5 1 
113 30 10 19 4 
4
6 4 2 5 
117 30 10 19 
4
6 4 2 5 
113 34 10 19 
4
6 4 2 5 
113 30 14 19 
4
6 4 2 5 
113 30 10 23 
5
6 4 2 5 1 
105 3...

result:

wrong answer wront output format with x_i at test case 1

Test #8:

score: 0
Wrong Answer
time: 463ms
memory: 179048kb

input:

8 257
100000 100
32768 65536 262144 32768 8388608 1048576 4 67108864 16384 32768 262144 8192 512 134217728 65536 4194304 262144 67108864 1024 262144 64 32 65536 2097152 268435456 1 2048 4194304 16777216 8 16384 2 2048 16777216 268435456 262144 1048576 8388608 16 268435456 2 128 4194304 262144 32768 ...

output:

303389274
100
13
99987 99979 99935 99958 99992 99983 99973 99976 99998 99985 99978 99963 99915 
268435456 33554432 1048576 262144 65536 16384 4096 2048 512 64 16 8 2 
13
99987 99979 99935 99958 99992 99983 99973 99976 99998 99985 99978 99963 99906 
268435456 33554432 1048576 262144 65536 16384 4096 ...

result:

wrong answer wront output format with x_i at test case 1

Test #9:

score: 0
Wrong Answer
time: 473ms
memory: 177672kb

input:

9 266
100000 100
134217728 524288 8388608 4 8 8388608 33554432 4 536870912 4 16 8 33554432 33554432 256 65536 8 16 64 8 256 2048 268435456 256 8192 2 1024 65536 32 2048 134217728 8 1048576 8 16777216 33554432 1024 33554432 131072 16 2 33554432 8192 512 4194304 2048 268435456 256 536870912 16777216 1...

output:

269988539
100
15
99995 99972 99985 100000 99997 99975 99925 99970 99958 99999 99965 99964 99897 99938 99960 
268435456 1048576 262144 131072 65536 32768 8192 4096 512 128 32 16 8 2 1 
15
99995 99972 99985 100000 99997 99975 99925 99970 99958 99999 99965 99964 99897 99938 99941 
268435456 1048576 262...

result:

wrong answer wront output format with x_i at test case 1

Test #10:

score: 0
Wrong Answer
time: 465ms
memory: 177804kb

input:

10 269
100000 100
1048576 2 64 67108864 1024 67108864 268435456 32768 8388608 32 256 2 268435456 262144 524288 262144 2 524288 64 8192 262144 536870912 2097152 64 1024 2 1048576 128 2 8388608 512 32768 1 8388608 4 2 268435456 128 67108864 65536 2 8388608 2048 16 2048 4096 32768 1048576 32768 32 8388...

output:

471323918
100
15
99979 99986 99996 99857 99959 99900 99992 99978 99949 99988 99983 99968 99955 99958 99984 
268435456 134217728 67108864 1048576 262144 131072 65536 32768 16384 4096 1024 256 8 4 2 
15
99979 99986 99996 99857 99959 99900 99992 99978 99949 99988 99983 99968 99955 99958 99972 
26843545...

result:

wrong answer wront output format with x_i at test case 1

Test #11:

score: 0
Wrong Answer
time: 599ms
memory: 138400kb

input:

11 2323
100000 1
0 3170633 888529329 347839787 101667249 273239696 1028446182 411994109 710973319 298677951 299452068 519308796 361451040 488605068 74238166 997794448 478367019 532094220 747266199 217905213 682359917 774814810 234838947 456387659 38459020 434013070 633290806 173828476 94076883 56828...

output:

11962
1
15
33798 38129 49541 78515 8448 5529 47454 99572 92451 93848 98306 99366 99856 99867 99986 
8212 139 2165 1364 54 19 1 1 1 1 1 1 1 1 1 
1607036
1
11
15 12 4 6 16 22 28 7 26 29 36 
978944 520064 65471 32512 6136 3836 60 6 4 2 1 
106
1
3
2 3 1 
29 45 32 
3
1
2
5 6 
2 1 
126
1
5
9 10 3 5 7 
60 ...

result:

wrong answer wront output format with x_i at test case 1

Test #12:

score: 0
Wrong Answer
time: 595ms
memory: 138560kb

input:

12 2205
100000 1
0 684191025 220215685 982495864 602362406 687396179 439432236 81065680 398068897 269754402 306183653 309939439 664994998 1011962742 338161922 629593565 926305057 1026259775 711874360 69406110 426672919 208267066 551253027 9384823 26156203 778817402 654214308 527029151 1065024353 287...

output:

22539
1
18
9642 21599 38873 89268 92825 38540 14681 11813 94825 86392 98800 99679 99251 99698 99988 99981 99998 99999 
18405 2826 846 404 28 14 1 5 1 1 1 1 1 1 1 1 1 1 
5296170
1
10
11 8 19 20 16 38 9 14 30 23 
4194240 1048320 31744 15360 6142 252 64 30 16 2 
2997548
1
3
5 4 3 
1957886 1031664 7998 ...

result:

wrong answer wront output format with x_i at test case 1

Test #13:

score: 0
Wrong Answer
time: 599ms
memory: 139032kb

input:

13 2166
100000 1
0 58930516 543560994 783997157 728082180 789115629 549794748 81818067 214839912 203394814 711969322 908524000 570262778 992867922 359455295 88035653 412186516 937931728 331800409 545354553 535440658 894562512 657466952 555070606 469471475 1055263866 874958292 76960239 478302168 6800...

output:

8241
1
16
29190 54258 68234 66 82425 26786 72809 96789 95831 99162 99656 98518 99924 99975 100000 99999 
7798 156 192 63 14 5 4 1 1 1 1 1 1 1 1 1 
2846999
1
4
4 2 5 1 
2049874 103522 562531 131072 
1605
1
6
10 12 6 23 21 22 
1023 480 96 4 1 1 
21150
1
4
2 5 3 1 
13220 3848 4050 32 
13
1
2
2 1 
9 4 
...

result:

wrong answer wront output format with x_i at test case 1

Test #14:

score: 0
Wrong Answer
time: 1ms
memory: 51796kb

input:

14 23
1000 10
0 357293452 452461848 986047039 546588280 762710079 767831017 39741545 416114273 515599366 1018969624 603342125 928112286 1053016142 240953466 533088067 1028134429 504727014 371307863 834428873 968387878 478550336 1047217797 1046651542 777749850 866989319 92995163 251915198 363285573 1...

output:

264227
10
12
876 999 203 565 996 786 355 955 134 673 983 1000 
251113 3995 2638 531 5226 697 9 10 5 1 1 1 
12
876 999 203 565 996 786 355 955 134 673 983 998 
251113 3995 2638 531 5226 697 9 10 5 1 1 1 
12
876 999 203 565 996 786 355 955 134 673 983 997 
251113 3995 2638 531 5226 697 9 10 5 1 1 1 
1...

result:

wrong answer wront output format with x_i at test case 1

Test #15:

score: 0
Wrong Answer
time: 4ms
memory: 51900kb

input:

15 23
1000 10
0 978686021 287986921 276311856 889616598 739968417 1060147652 463275477 172393699 591333230 983197307 235514434 330494755 449056272 882229818 781111474 275587745 980041928 334198691 305313012 415758352 947298893 950211162 909723054 961622596 917454340 161928901 404346316 369133631 103...

output:

709905
10
15
842 482 279 727 32 283 656 677 917 978 977 904 966 989 999 
693086 12836 3862 47 56 6 4 1 1 1 1 1 1 1 1 
15
842 482 279 727 32 283 656 677 917 978 977 904 966 989 996 
693086 12836 3862 47 56 6 4 1 1 1 1 1 1 1 1 
15
842 482 279 727 32 283 656 677 917 978 977 904 966 989 995 
693086 1283...

result:

wrong answer wront output format with x_i at test case 1

Test #16:

score: 0
Wrong Answer
time: 3ms
memory: 52284kb

input:

16 15
1000 10
0 631723071 149784582 965844254 515554472 887253148 467825521 981769969 1054193550 627909969 590277818 159342752 658063143 667914173 169490051 25536270 337269419 1056885019 980490575 750858271 553446484 347553447 376197986 1053224035 473470890 123586 97769047 761755924 510998818 256094...

output:

737485
10
15
924 384 747 880 474 790 265 831 625 599 172 922 952 988 1000 
388082 215546 87404 41649 2917 1600 227 16 7 6 27 1 1 1 1 
15
924 384 747 880 474 790 265 831 625 599 172 922 952 988 995 
388082 215546 87404 41649 2917 1600 227 16 7 6 27 1 1 1 1 
15
924 384 747 880 474 790 265 831 625 599 ...

result:

wrong answer wront output format with x_i at test case 1

Test #17:

score: 0
Wrong Answer
time: 3ms
memory: 54068kb

input:

17 25
1000 10
0 751950140 901599329 987895071 306253500 278530668 539473653 911723672 948474628 722632384 369217860 428703545 999113214 567923990 53499297 1013528916 263060554 669297221 349021033 832596533 893306880 892438572 345611286 331257977 488113061 578929864 881846255 320356815 76057168 70469...

output:

1119212
10
14
887 215 122 576 528 717 431 552 236 97 950 920 678 995 
922903 149775 5641 1237 26620 6239 6002 674 107 7 4 1 1 1 
14
887 215 122 576 528 717 431 552 236 97 950 920 678 989 
922903 149775 5641 1237 26620 6239 6002 674 107 7 4 1 1 1 
14
887 215 122 576 528 717 431 552 236 97 950 920 678...

result:

wrong answer wront output format with x_i at test case 1

Test #18:

score: 0
Wrong Answer
time: 433ms
memory: 140052kb

input:

18 195
100000 1000
0 828483622 617711013 242092397 1034026464 456205583 731635466 382894773 533786631 582730039 74863848 661821965 368857719 541353387 662605236 580923280 798012506 54823622 333416217 39292129 995195996 477140985 1014499425 362164396 970752859 879997855 96768859 1005365898 576674982 ...

output:

23456
1000
17
7223 12609 96808 94288 94649 26970 27646 8651 70487 91597 78081 99814 98603 99454 99965 99992 99998 
1743 20988 393 279 1 34 4 3 3 1 1 1 1 1 1 1 1 
17
7223 12609 96808 94288 94649 26970 27646 8651 70487 91597 78081 99814 98603 99454 99965 99992 99954 
1743 20988 393 279 1 34 4 3 3 1 1 ...

result:

wrong answer wront output format with x_i at test case 1

Test #19:

score: 0
Wrong Answer
time: 449ms
memory: 139572kb

input:

19 228
100000 1000
0 230727359 951312015 741711018 367230626 775024687 130794976 435788836 781961691 736694220 427610697 1016199868 798240399 340962994 1006804448 708169239 976753368 364431996 495851435 246658001 190094424 1054346726 639713727 218794912 229693460 313349630 85091951 418997497 2734590...

output:

5906
1000
18
97656 67985 97479 94039 63184 36690 60712 57375 67455 31031 49706 96652 94258 99995 99982 99996 99998 100000 
656 4034 1071 20 28 71 11 2 3 2 1 1 1 1 1 1 1 1 
18
97656 67985 97479 94039 63184 36690 60712 57375 67455 31031 49706 96652 94258 99995 99982 99996 99998 99999 
656 4034 1071 20...

result:

wrong answer wront output format with x_i at test case 1

Test #20:

score: 0
Wrong Answer
time: 415ms
memory: 139060kb

input:

20 221
100000 1000
0 716795222 632538294 1008333912 248043863 1023411987 11954597 917179098 100756831 19780613 336926235 768679016 371044675 360783184 402042708 1056697208 567354265 284551620 146863144 1008241012 536649321 680142584 506474136 80860918 973856876 30288601 668537691 877380398 131785980...

output:

13893
1000
15
94588 8817 49780 12957 82418 31013 68169 90592 94709 99263 99963 99968 99990 100000 99999 
11096 307 2415 22 33 10 2 1 1 1 1 1 1 1 1 
15
94588 8817 49780 12957 82418 31013 68169 90592 94709 99263 99963 99968 99990 100000 99998 
11096 307 2415 22 33 10 2 1 1 1 1 1 1 1 1 
15
94588 8817 4...

result:

wrong answer wront output format with x_i at test case 1

Test #21:

score: 0
Wrong Answer
time: 422ms
memory: 138628kb

input:

21 204
100000 1000
0 867143449 289720871 62880653 256495758 373546157 114942061 524281177 164218453 261500635 241690011 911469619 794136322 460604293 201667773 1001245336 873383805 136426866 731765422 1036091702 428463064 474020221 916532901 913755707 704796468 745115429 387268771 611877390 10158806...

output:

1241
1000
11
72308 98425 17963 66676 47178 55333 98251 99833 99990 99994 100000 
970 3 132 119 11 1 1 1 1 1 1 
11
72308 98425 17963 66676 47178 55333 98251 99833 99990 99994 99998 
970 3 132 119 11 1 1 1 1 1 1 
11
72308 98425 17963 66676 47178 55333 98251 99833 99990 99994 99997 
970 3 132 119 11 1 ...

result:

wrong answer wront output format with x_i at test case 1

Test #22:

score: 0
Wrong Answer
time: 446ms
memory: 141712kb

input:

22 259
99999 1000
0 184042404 114860590 81955939 149152356 141033215 259145072 144981065 194732174 87943638 3239431 196977178 27923106 209711053 259763893 143914852 152580789 5161376 220134523 49139129 179593854 115442954 268238166 42599190 6509126 76156465 153820967 111093283 89981466 186373935 684...

output:

553
1000
13
89972 28126 74516 37309 77278 96126 95837 99490 99109 99929 99945 99994 99993 
279 253 11 1 1 1 1 1 1 1 1 1 1 
13
89972 28126 74516 37309 77278 96126 95837 99490 99109 99929 99945 99994 99990 
279 253 11 1 1 1 1 1 1 1 1 1 1 
13
89972 28126 74516 37309 77278 96126 95837 99490 99109 99929 ...

result:

wrong answer wront output format with x_i at test case 1

Test #23:

score: 0
Wrong Answer
time: 447ms
memory: 141504kb

input:

23 229
99999 1000
0 67684423 27530736 262933500 210540490 87986446 142495215 8108489 162333902 7472566 74649932 22340176 96113149 105072940 96282592 479313 231805795 113210597 21907161 131354773 137785844 44861082 60046190 195538723 185926550 49537906 255986573 48373131 153611664 98228321 259354412 ...

output:

1406
1000
14
73671 40342 46982 73472 39604 28521 7858 42925 88604 70009 99667 99938 99693 99984 
731 207 130 47 187 81 15 1 2 1 1 1 1 1 
14
73671 40342 46982 73472 39604 28521 7858 42925 88604 70009 99667 99938 99693 99981 
731 207 130 47 187 81 15 1 2 1 1 1 1 1 
14
73671 40342 46982 73472 39604 285...

result:

wrong answer wront output format with x_i at test case 1

Test #24:

score: 0
Wrong Answer
time: 408ms
memory: 103524kb

input:

24 299
99999 2000
0 46856671573051356 144451722821279396 194202742420356088 42768202435393968 146930968341077918 121735975802283045 43381059403904591 9790356926653248 90585698509588415 182205406048046442 106698163084666387 83495547377102990 95530264027271484 151047337738852707 263069394355867183 215...

output:

3144886350134
0
171390666309632
0
40813686188869
0
9
0
3827735658
0
298766967590
0
624193874495696
0
158581180356032222
0
17483
0
1219144
0
16005705485
0
7117548522
0
79092772551864
0
11113406150121450
0
308536016766
0
653878648732044
0
9308526
33
9
22 37 2 40 15 23 17 35 46 
8257536 1048575 1792 49...

result:

wrong answer wront output format with x_i at test case 17

Test #25:

score: 0
Wrong Answer
time: 447ms
memory: 103324kb

input:

25 308
99999 2000
0 62481075687254565 108220925926439751 147822046782831506 143330595029626008 266264147751224285 261103833765129444 47417861284547971 240063309104990334 57610062682346847 86133126920120030 166996559481841953 262167570538721871 37862622740033692 1564310050448344 238599881630673329 84...

output:

1899280322188
0
618202410787
0
653774
0
31775
2
3
3 2 1 
31744 29 2 
3
3 2 4 
31748 29 2 
156807277242969906
0
279243237900
0
130250079
10
5
4 2 5 6 1 
128973824 1015296 258944 2014 1 
4
4 2 5 6 
128973825 1015296 258944 2014 
4
4 2 5 6 
128973824 1015297 258944 2014 
4
4 2 5 6 
128973824 1015296 25...

result:

wrong answer wront output format with x_i at test case 4