QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#382529#4243. Good ColoringKevin5307AC ✓183ms33540kbC++231.9kb2024-04-08 15:56:212024-04-08 15:56:23

Judging History

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

  • [2024-04-08 15:56:23]
  • 评测
  • 测评结果:AC
  • 用时:183ms
  • 内存:33540kb
  • [2024-04-08 15:56:21]
  • 提交

answer

//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
int color[300300];
int lst[300300];
int mycolor[300300];
vector<int> G[300300];
vector<int> vec[300300];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int t;
	cin>>t;
	while(t--)
	{
		int n,m,k;
		cin>>n>>m>>k;
		for(int i=1;i<=k;i++)
			vec[i].clear();
		for(int i=1;i<=n;i++)
		{
			cin>>color[i];
			vec[color[i]].pb(i);
		}
		for(int i=1;i<=n;i++)
			G[i].clear();
		for(int i=1;i<=m;i++)
		{
			int u,v;
			cin>>u>>v;
			G[u].pb(v);
			G[v].pb(u);
		}
		vector<int> order;
		for(int i=1;i<=k;i++)
			for(auto x:vec[i])
				order.pb(x);
		for(int i=1;i<=n;i++)
			mycolor[i]=0;
		for(auto x:order)
		{
			vector<int> vec;
			vec.pb(0);
			for(auto y:G[x])
				vec.pb(mycolor[y]);
			srt(vec);
			uni(vec);
			int mex=0;
			while(mex<sz(vec)&&vec[mex]==mex)
				mex++;
			mycolor[x]=mex;
			if(mex)
				for(auto y:G[x])
					if(mycolor[y]==mex-1)
						lst[x]=y;
		}
		k=*max_element(mycolor+1,mycolor+n+1);
		cout<<k<<" ";
		for(int i=1;i<=n;i++)
			cout<<mycolor[i]<<" ";
		int cur=max_element(mycolor+1,mycolor+n+1)-mycolor;
		for(int i=1;i<=k;i++)
		{
			cout<<cur<<" ";
			cur=lst[cur];
		}
		cout<<'\n';
	}
	return 0;
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 5652kb

input:

2
3 3 3
1 2 3
1 2
2 3
3 1
3 1 3
1 2 3
1 2

output:

3 1 2 3 3 2 1 
2 1 2 1 2 1 

result:

ok good job (2 test cases)

Test #2:

score: 0
Accepted
time: 79ms
memory: 7704kb

input:

50000
5 7 5
5 2 3 1 5
4 3
3 1
5 2
5 4
5 3
2 4
4 1
6 5 5
1 1 4 5 5 2
2 3
3 5
6 1
2 4
1 5
7 5 6
4 6 3 5 6 5 3
5 4
5 6
7 2
1 2
3 6
7 7 4
3 4 2 1 3 4 1
6 7
3 4
3 6
3 5
6 1
2 3
2 4
5 6 5
3 3 4 4 1
4 5
2 3
5 2
3 1
4 2
5 1
6 6 3
2 3 2 2 1 1
2 6
3 5
2 5
6 3
4 5
4 6
7 5 2
1 2 1 1 2 2 1
5 4
5 3
7 5
1 2
3 2
7 ...

output:

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

result:

ok good job (50000 test cases)

Test #3:

score: 0
Accepted
time: 66ms
memory: 7600kb

input:

20000
14 17 2
1 2 1 2 1 1 1 2 1 1 1 2 2 2
9 4
13 1
1 12
2 11
14 5
6 12
1 14
12 9
13 11
14 9
13 9
11 14
10 8
2 3
2 6
13 3
5 13
14 11 4
1 3 1 4 3 2 2 3 1 2 4 1 4 3
14 4
14 13
11 10
9 10
1 7
9 7
12 7
12 13
2 6
11 2
10 13
14 17 2
2 1 1 1 2 2 2 2 1 2 1 2 2 1
1 2
10 14
4 7
10 2
8 3
14 13
11 7
13 9
12 4
1 ...

output:

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

result:

ok good job (20000 test cases)

Test #4:

score: 0
Accepted
time: 60ms
memory: 7896kb

input:

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

output:

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

result:

ok good job (25000 test cases)

Test #5:

score: 0
Accepted
time: 62ms
memory: 5868kb

input:

5000
61 7 19
2 15 8 12 12 11 14 4 19 3 18 14 1 9 18 10 18 3 17 8 9 9 16 13 16 17 6 19 13 4 16 13 19 11 18 13 8 13 15 10 17 9 4 4 4 18 2 12 5 7 16 5 7 5 9 3 8 5 12 2 14
43 23
2 10
54 12
48 23
24 49
24 4
17 54
63 81 25
21 4 12 16 2 24 9 17 25 24 9 1 4 24 24 25 20 4 14 25 18 19 3 4 17 7 13 19 14 6 14 1...

output:

2 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 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 10 
3 1 1 3 1 1 3 2 3 1 3 2 1 1 3 1 2 2 1 2 1 1 1 2 1 1 1 1 1 1 1 3 1 2 1 2 1 2 1 3 2 2 1 2 1 1 2 1 2 2 2 1 1 2 1 2 1 2 2 3 1 3 1 1 3 55 2 
4 2 1 1 2 3 2 2 2 2 1 2 2 3 1 2 1 ...

result:

ok good job (5000 test cases)

Test #6:

score: 0
Accepted
time: 62ms
memory: 7884kb

input:

5000
55 12 40
14 23 25 2 29 16 19 33 15 33 30 38 28 33 7 32 21 9 6 29 13 12 17 12 27 9 35 27 7 16 38 7 15 39 11 14 31 13 23 27 2 20 21 29 37 12 9 25 31 21 3 3 24 37 37
46 10
42 54
48 33
53 13
24 14
9 17
25 34
52 6
6 46
35 17
50 18
36 3
53 37 17
10 9 14 15 10 16 10 12 16 12 6 3 9 17 15 15 13 10 5 11 ...

output:

2 1 1 2 1 1 2 1 1 1 2 1 1 2 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 2 1 3 36 
3 2 1 1 1 1 2 2 2 1 1 1 1 2 1 1 2 1 2 1 2 1 1 2 2 3 1 1 1 2 1 1 2 1 1 1 2 1 1 2 1 1 1 1 3 1 2 1 1 2 1 2 2 1 25 39 31 
3 1 1 2 1 1 1 2 1 1 1 1 1 1 1 3 1 2 1 1 1 1 1 2 1 1 1 1 1 1 1 2 ...

result:

ok good job (5000 test cases)

Test #7:

score: 0
Accepted
time: 61ms
memory: 5632kb

input:

5000
59 13 29
17 8 27 4 12 9 19 23 13 4 7 27 25 9 14 10 6 7 10 19 18 4 5 1 26 8 17 27 15 26 14 26 6 4 18 11 9 21 15 20 25 15 17 24 29 6 22 28 8 3 26 20 23 11 23 27 10 6 18
52 5
31 24
43 15
10 45
53 24
46 40
37 29
33 2
46 13
34 33
23 15
38 11
22 45
55 77 18
10 16 13 4 9 12 14 6 8 16 17 1 9 16 10 13 9...

output:

2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 2 1 1 1 1 2 1 2 1 1 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 1 1 13 46 
4 2 1 1 1 2 1 2 1 3 3 1 1 1 3 3 2 3 2 1 1 1 2 3 4 2 1 2 2 1 1 1 2 2 3 1 1 2 1 1 2 3 3 1 2 2 1 3 3 2 2 2 1 2 2 2 24 9 37 52 
4 1 2 2 1 1 1 2 2 2 3 1 1 1 1 1 2 1 1 2 1 1 1 2 1...

result:

ok good job (5000 test cases)

Test #8:

score: 0
Accepted
time: 61ms
memory: 7684kb

input:

5000
44 77 32
19 2 23 24 9 28 23 19 7 8 19 32 18 17 2 32 18 27 10 20 18 3 26 13 16 8 21 11 30 26 7 15 14 30 22 21 4 30 31 32 22 17 31 15
24 11
26 38
36 33
41 27
41 36
24 17
27 14
2 7
18 8
28 43
18 41
26 2
31 16
35 42
12 14
31 43
5 42
22 17
37 20
32 33
23 33
27 26
19 18
3 13
19 23
3 39
14 35
5 18
14 ...

output:

5 1 1 3 1 1 1 3 2 2 1 3 4 1 2 1 1 3 4 1 2 1 1 2 2 1 2 1 1 3 3 2 2 1 1 4 2 1 1 5 4 3 2 3 2 39 35 17 24 19 
3 1 3 1 1 1 1 2 1 1 1 2 1 1 2 3 3 1 2 1 1 2 2 2 2 2 3 1 2 1 2 3 1 1 1 1 1 1 2 1 3 2 1 1 2 2 11 19 
4 1 2 1 1 1 2 1 2 4 2 1 2 2 1 1 1 2 3 3 1 3 1 2 2 3 2 2 2 1 2 3 2 2 1 4 1 2 2 1 1 3 1 1 1 1 3 3...

result:

ok good job (5000 test cases)

Test #9:

score: 0
Accepted
time: 50ms
memory: 7708kb

input:

1000
135 126 10
8 2 5 6 1 9 3 7 4 10 10 8 4 5 1 8 10 1 8 10 1 5 8 7 4 1 5 6 6 4 8 8 1 3 7 2 1 4 8 1 10 2 3 6 8 7 4 4 6 2 6 1 7 3 3 6 7 9 8 2 10 1 9 9 3 8 9 9 2 3 8 2 7 1 2 10 5 5 5 1 3 1 1 6 6 7 3 6 8 1 10 10 8 8 4 2 4 5 7 9 4 7 1 1 3 6 10 2 10 1 1 9 1 9 1 6 10 4 2 6 9 3 3 9 7 10 2 8 7 3 10 8 3 3 7
...

output:

3 2 1 2 3 1 1 2 2 1 1 3 3 2 2 1 1 2 1 3 1 1 2 1 2 1 1 1 2 1 1 1 3 1 2 1 1 1 3 1 1 2 1 1 1 2 1 2 1 2 1 2 1 1 2 2 2 1 1 1 1 3 1 1 1 1 2 2 1 2 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 2 2 1 3 2 1 2 1 3 2 2 1 1 2 2 3 2 1 1 1 2 2 3 2 2 1 1 2 1 1 1 2 1 2 1 1 3 1 2 2 1 1 1 1 2 1 1 1 1 1 3 4 95 43 
5 2 1 1 1 3 2 3 2 1...

result:

ok good job (1000 test cases)

Test #10:

score: 0
Accepted
time: 68ms
memory: 5644kb

input:

1000
134 703 112
69 50 79 65 63 89 61 25 28 104 81 110 96 18 93 105 63 35 56 22 25 39 84 43 34 4 90 24 75 98 37 21 42 98 42 61 17 84 108 95 46 6 35 22 109 5 39 54 18 105 104 96 27 87 100 14 80 44 21 43 62 94 60 85 106 85 89 5 70 37 76 24 71 73 26 68 51 36 12 38 74 95 91 106 83 76 32 90 58 87 69 111 ...

output:

8 5 1 4 2 5 1 2 2 3 5 4 4 3 3 6 4 2 4 5 2 1 4 5 3 3 1 7 2 4 6 4 3 1 5 1 4 2 4 3 7 2 1 1 1 3 2 1 3 2 4 5 6 2 3 5 1 2 2 1 4 4 6 2 4 6 1 6 1 3 3 5 1 1 5 2 5 3 4 2 1 1 8 4 4 5 4 3 6 4 4 5 2 5 2 1 3 2 3 2 2 2 3 3 7 2 4 1 1 2 4 2 2 5 1 1 3 1 3 2 5 1 4 3 6 1 1 3 2 6 4 2 6 4 4 82 27 132 74 122 70 53 115 
5 ...

result:

ok good job (1000 test cases)

Test #11:

score: 0
Accepted
time: 66ms
memory: 7936kb

input:

1000
147 745 6
1 3 2 5 5 6 4 6 1 6 4 6 4 4 5 3 5 4 6 3 1 4 6 3 2 5 2 5 1 6 1 1 6 3 6 5 5 5 5 3 2 6 1 4 2 1 5 5 6 1 3 3 2 3 1 1 2 4 4 6 6 5 3 1 3 4 3 2 2 5 5 3 5 3 2 5 1 3 1 2 2 2 5 2 4 5 5 1 2 1 6 1 3 4 6 2 6 4 3 6 6 6 6 3 3 5 1 4 6 5 5 5 3 2 4 6 5 5 5 6 2 2 6 5 1 4 4 2 5 5 6 3 3 6 4 6 5 6 5 6 2 2 3...

output:

6 1 3 2 5 4 6 4 3 1 6 4 4 4 3 2 3 3 4 5 3 1 4 6 1 2 5 2 5 1 6 1 1 6 3 6 3 4 3 4 1 1 6 1 2 2 1 4 5 6 1 3 2 2 3 1 1 1 1 4 2 6 5 3 1 2 4 3 2 2 2 3 1 5 3 2 5 1 3 1 2 2 1 4 2 4 3 5 1 2 1 2 1 1 4 2 2 5 4 3 2 6 6 3 3 3 1 1 4 6 3 5 4 3 2 3 2 5 5 1 1 2 2 6 5 1 4 2 2 4 5 6 3 1 6 4 6 3 2 5 2 2 2 3 3 5 1 1 6 48...

result:

ok good job (1000 test cases)

Test #12:

score: 0
Accepted
time: 57ms
memory: 7652kb

input:

1000
156 669 112
107 25 100 2 63 43 81 60 14 54 83 91 73 21 74 49 81 17 71 60 66 72 96 57 51 60 78 19 30 49 87 23 55 62 43 26 53 80 76 10 66 76 81 7 49 10 99 101 35 99 86 17 80 38 23 24 92 77 2 9 13 110 76 17 48 63 106 79 110 44 4 40 42 9 29 54 98 58 52 89 83 26 103 75 87 9 36 84 96 1 111 27 84 75 1...

output:

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

result:

ok good job (1000 test cases)

Test #13:

score: 0
Accepted
time: 63ms
memory: 5992kb

input:

100
745 3559 5
2 2 3 4 5 1 1 3 1 3 5 3 2 1 3 2 4 2 3 1 3 3 1 1 3 4 3 3 2 2 4 1 1 2 1 2 1 1 3 4 4 1 4 1 5 2 2 2 5 2 3 4 2 3 4 5 5 5 2 1 2 5 4 2 3 5 1 1 1 2 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1 1 2 1 2 2 1 1 2 2 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 2 1 2 1 2 1 2 2 2 2 2 1 2 2 ...

result:

ok good job (100 test cases)

Test #15:

score: 0
Accepted
time: 63ms
memory: 7976kb

input:

100
747 5965 4
1 4 1 3 2 4 2 3 4 2 3 4 3 2 3 1 2 2 2 3 2 3 1 2 4 2 4 2 3 3 1 2 3 4 3 1 2 4 1 2 2 2 1 4 4 3 1 4 3 3 2 1 3 1 3 2 3 4 3 4 2 3 2 2 1 1 4 3 4 3 4 1 1 3 2 3 4 2 2 2 3 1 1 4 4 2 1 2 2 4 3 1 2 2 4 3 2 2 2 1 2 3 3 1 1 3 4 1 1 3 1 1 2 4 3 4 2 1 1 2 4 2 2 1 1 3 1 4 3 2 4 4 4 3 1 2 1 4 2 2 4 4 4...

output:

4 1 4 1 3 2 4 2 3 4 2 3 4 3 2 3 1 2 2 2 3 2 3 1 2 4 2 4 2 3 3 1 2 3 4 3 1 2 4 1 2 2 2 1 4 4 3 1 4 3 3 2 1 3 1 3 2 3 4 3 4 2 3 2 2 1 1 4 3 4 3 4 1 1 2 2 3 4 1 2 2 3 1 1 4 4 2 1 2 2 4 3 1 2 2 4 3 2 2 2 1 2 3 3 1 1 3 4 1 1 3 1 1 2 4 3 4 2 1 1 2 4 2 2 1 1 3 1 4 3 2 4 4 4 3 1 2 1 4 2 2 4 4 4 1 3 1 3 2 2 ...

result:

ok good job (100 test cases)

Test #16:

score: 0
Accepted
time: 64ms
memory: 8172kb

input:

100
572 5584 5
1 2 5 1 2 4 3 2 3 2 2 5 1 5 1 2 1 5 4 4 2 2 4 5 4 1 4 1 2 2 3 4 5 5 4 3 2 5 2 1 5 2 5 5 4 2 2 1 3 1 3 2 5 1 4 5 4 3 5 1 5 4 4 3 3 4 4 4 2 1 1 1 1 3 2 2 1 2 3 2 5 3 5 4 2 5 5 1 1 5 1 3 4 2 1 4 4 4 5 1 5 1 5 5 2 2 5 5 1 4 3 5 3 2 3 5 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test cases)

Test #18:

score: 0
Accepted
time: 71ms
memory: 10156kb

input:

10
4778 43832 2945
2936 1374 2101 578 1699 2610 1449 2653 2508 2302 681 2649 1431 1148 908 2536 557 1554 562 1661 2660 958 2837 1862 1788 2007 2808 933 191 993 2160 1243 372 1226 1768 864 1054 2528 681 658 159 141 460 2848 678 1161 2168 1467 2735 1948 1124 1058 2332 1544 1064 1589 2863 1738 41 452 2...

output:

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

result:

ok good job (10 test cases)

Test #19:

score: 0
Accepted
time: 69ms
memory: 7816kb

input:

10
5339 46364 5109
4306 4160 4567 3831 4939 5091 2222 936 3667 2239 790 4781 2874 4200 4984 851 5010 3575 915 1380 4941 4922 3995 2771 4808 3733 3068 1440 818 1810 4553 1382 1974 683 3887 140 1649 1608 635 317 5089 1996 1909 493 5092 2075 2202 2883 2216 3521 3948 935 4544 4244 1504 4557 3337 2772 35...

output:

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

result:

ok good job (10 test cases)

Test #20:

score: 0
Accepted
time: 69ms
memory: 10212kb

input:

10
4391 58577 4
4 3 1 3 2 2 1 4 2 3 2 3 4 4 2 3 3 1 3 4 3 4 4 3 1 2 3 3 3 1 1 3 3 1 1 2 2 1 4 1 3 3 3 2 1 3 3 3 4 2 3 2 2 4 1 4 3 4 4 3 1 3 3 4 3 2 1 2 1 2 4 3 1 2 3 2 4 4 4 2 2 3 2 2 2 1 2 4 4 4 1 1 4 2 2 2 1 2 1 2 1 3 2 4 2 4 2 3 3 3 4 1 2 3 3 1 3 1 3 1 1 1 2 2 1 2 4 1 2 3 2 3 4 1 1 1 4 1 4 2 2 2 ...

output:

4 4 3 1 3 2 2 1 4 2 3 2 3 4 4 2 3 3 1 3 4 3 4 4 3 1 2 3 3 3 1 1 3 3 1 1 2 2 1 4 1 3 3 3 2 1 3 3 3 4 2 3 2 2 4 1 4 3 4 4 3 1 3 3 4 3 2 1 2 1 2 4 3 1 2 3 2 4 4 4 2 2 3 2 2 2 1 2 4 4 4 1 1 4 2 2 2 1 2 1 2 1 3 2 4 2 4 2 3 3 3 4 1 2 3 3 1 3 1 3 1 1 1 2 2 1 2 4 1 2 3 2 3 4 1 1 1 4 1 4 2 2 2 4 1 1 2 4 3 4 ...

result:

ok good job (10 test cases)

Test #21:

score: 0
Accepted
time: 65ms
memory: 10056kb

input:

10
7288 44997 600
180 409 155 178 42 262 418 273 545 326 416 592 449 38 521 218 342 94 121 423 229 547 553 25 402 596 360 441 550 442 407 294 93 296 472 171 105 145 425 95 251 466 27 106 319 439 487 269 172 250 408 238 590 313 479 239 105 362 546 592 454 441 273 563 177 455 120 17 289 458 188 402 17...

output:

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

result:

ok good job (10 test cases)

Test #22:

score: 0
Accepted
time: 64ms
memory: 10544kb

input:

10
9026 43096 5774
2327 3530 304 3560 5186 925 5452 2103 4460 2708 3555 1295 760 5126 3070 4391 3260 437 331 1399 3955 5154 1074 3736 596 1110 1639 1857 523 2992 5194 775 2243 1891 826 1128 4882 4532 2045 1411 1778 3238 852 3428 5144 4596 5108 688 345 1011 464 1019 2050 4449 2102 671 163 2356 2668 3...

output:

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

result:

ok good job (10 test cases)

Test #23:

score: 0
Accepted
time: 66ms
memory: 10176kb

input:

10
5239 43999 850
544 176 534 783 144 369 57 186 458 779 119 585 50 401 658 524 495 296 504 552 57 742 192 453 187 813 585 379 647 302 459 709 473 687 75 731 551 314 654 293 122 668 88 525 128 546 464 482 18 450 142 107 234 272 559 844 133 100 550 91 82 482 307 796 469 193 251 114 363 449 739 203 80...

output:

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

result:

ok good job (10 test cases)

Test #24:

score: 0
Accepted
time: 70ms
memory: 10320kb

input:

10
1589 49515 1521
47 1290 1406 1479 116 785 147 317 1364 1263 830 541 60 814 789 949 899 1092 1155 283 1375 500 132 1520 129 995 1384 1109 940 1146 523 698 53 715 1116 926 956 429 892 866 369 223 266 971 509 1242 229 800 532 1519 455 1115 460 1079 1171 831 448 385 173 538 736 343 1 862 1281 243 101...

output:

23 2 16 6 13 4 3 5 7 11 14 14 3 1 9 11 17 14 4 5 6 12 11 4 19 6 11 22 4 1 4 6 12 3 4 7 12 12 8 2 6 3 3 4 16 4 14 1 11 10 16 6 18 9 5 19 13 6 6 4 10 5 6 1 10 15 5 15 17 19 6 1 4 11 1 12 3 4 3 2 9 23 7 2 18 16 15 14 12 7 4 6 1 4 13 14 7 8 12 11 4 11 14 13 1 2 5 14 21 9 9 17 2 13 16 2 6 3 5 14 3 4 10 7...

result:

ok good job (10 test cases)

Test #25:

score: 0
Accepted
time: 73ms
memory: 10492kb

input:

10
7945 43085 5554
1585 2838 2293 2495 3016 4728 3975 4498 5010 1268 5385 906 2648 4022 923 4663 4976 2262 5064 1838 3398 4637 752 537 946 408 3878 5194 4355 2914 1502 843 298 5363 1112 5084 810 714 4264 4635 4967 1684 2858 1477 3696 184 709 2151 1522 4215 3301 1353 178 4801 5470 3211 1015 3900 4665...

output:

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

result:

ok good job (10 test cases)

Test #26:

score: 0
Accepted
time: 78ms
memory: 10744kb

input:

10
7941 58853 1914
997 1207 1376 1184 798 149 821 1862 833 1476 579 1263 939 1523 184 1893 72 891 1043 272 875 1094 1319 1843 1911 1400 1869 1430 883 449 1566 992 902 621 631 300 948 1432 45 629 1511 43 464 441 373 961 989 1477 823 1132 447 1355 1826 888 1789 1567 9 72 669 990 229 1173 1875 269 1459...

output:

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

result:

ok good job (10 test cases)

Test #27:

score: 0
Accepted
time: 63ms
memory: 8020kb

input:

10
2714 40416 289
187 94 251 136 91 212 44 31 258 148 254 32 28 236 182 146 286 238 217 101 265 142 144 167 58 42 141 284 92 181 253 187 162 164 276 112 176 104 99 223 7 40 239 74 237 130 189 230 153 142 107 83 56 121 203 21 270 214 63 186 69 27 258 178 20 53 142 61 286 129 198 26 143 153 206 57 185...

output:

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

result:

ok good job (10 test cases)

Test #28:

score: 0
Accepted
time: 71ms
memory: 9744kb

input:

10
4502 50984 4151
3323 2923 3668 983 3693 3833 2557 2968 376 1453 1286 80 608 3590 1124 3097 1856 2296 1248 3147 169 3640 979 4112 4098 265 2651 1276 3286 2219 3646 3194 3460 1192 2556 1607 2600 3550 2845 518 726 3070 35 132 2997 3010 355 2986 2267 3183 2056 2715 1249 3980 4099 4079 2662 641 288 13...

output:

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

result:

ok good job (10 test cases)

Test #29:

score: 0
Accepted
time: 62ms
memory: 9664kb

input:

10
4334 54883 2
2 1 1 2 1 2 2 1 2 2 2 2 1 2 1 1 1 2 2 2 2 2 1 2 1 2 1 2 2 1 1 2 1 1 2 1 1 2 1 2 2 2 1 1 2 1 2 1 2 2 1 2 1 1 1 2 1 1 1 2 2 1 2 1 1 2 2 1 1 2 1 1 2 1 1 2 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 1 1 2 1 1 2 2 1 2 2 1 2 2 2 1 1 1 1 2 1 1 2 1 1 1 2 1 1 2 2 2 2 1 1 1 1 1 2 1 2 1 ...

output:

2 2 1 1 2 1 2 2 1 2 2 2 2 1 2 1 1 1 2 2 2 2 2 1 2 1 2 1 2 2 1 1 2 1 1 2 1 1 2 1 2 2 2 1 1 2 1 2 1 2 2 1 2 1 1 1 2 1 1 1 2 2 1 2 1 1 2 2 1 1 2 1 1 2 1 1 2 1 2 1 1 1 1 1 2 1 1 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 1 1 2 1 1 2 2 1 2 2 1 2 2 2 1 1 1 1 2 1 1 2 1 1 1 2 1 1 2 2 2 2 1 1 1 1 1 2 1 2 1 1 2 2 2 2 1 2 ...

result:

ok good job (10 test cases)

Test #30:

score: 0
Accepted
time: 58ms
memory: 9412kb

input:

10
3549 57136 9
3 5 9 4 4 3 6 3 8 6 4 1 4 3 4 6 1 3 3 2 7 4 5 1 3 7 9 4 6 2 4 6 5 2 1 6 6 9 9 9 3 7 7 4 9 9 4 3 7 8 8 3 6 5 3 9 1 1 6 9 6 9 7 8 8 7 8 7 2 9 4 6 2 5 1 6 4 9 4 8 4 1 9 2 1 6 9 7 2 7 7 1 2 8 3 1 2 5 6 9 2 5 4 3 2 3 8 6 1 5 7 9 5 8 6 7 8 1 9 6 5 7 3 2 8 7 1 8 6 2 3 1 7 5 6 7 9 9 7 1 4 2 ...

output:

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

result:

ok good job (10 test cases)

Test #31:

score: 0
Accepted
time: 69ms
memory: 7648kb

input:

10
2848 52774 4
3 1 1 4 3 1 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 5 2 3 3 4 4 5 5 3 1 2 4 1 1 1 3 2 5 3 4 5 2 2 3 2 1 3 4 4 2 3 1 2 1 2 2 4 4 1 5 4 5 1 1 5 5 4 5 1 1 5 5 2 5 5 5 3 5 5 3 3 1 1 1 2 1 3 5 1 4 5 4 3 1 5 1 2 4 1 2 4 3 5 3 1 3 4 5 5 2 1 2 3 3 5 2 3 5 3 4 2 5 ...

result:

ok good job (5 test cases)

Test #33:

score: 0
Accepted
time: 78ms
memory: 11288kb

input:

5
13368 58753 5911
4711 2863 3713 645 4547 525 3769 234 141 3528 2113 1208 1500 610 5783 5030 894 5125 26 4535 4478 4551 3760 518 2987 5004 5855 1225 3067 3001 4084 4090 1321 1951 3747 1407 5151 3781 607 3215 1510 5223 3129 2594 890 4271 2123 993 4938 5630 2825 5040 1789 908 1183 4040 685 2465 3147 ...

output:

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

result:

ok good job (5 test cases)

Test #34:

score: 0
Accepted
time: 114ms
memory: 23408kb

input:

1
273530 300000 4
3 2 1 4 2 2 2 4 4 4 1 2 2 2 1 4 1 2 2 4 3 4 4 3 3 2 2 1 2 4 1 3 2 3 3 1 4 2 3 4 1 3 3 3 3 2 2 2 4 4 2 1 3 1 2 2 1 2 3 3 2 2 4 2 3 1 2 1 1 2 2 2 3 1 1 2 2 4 1 3 4 1 4 4 1 4 1 2 4 1 1 3 3 2 1 4 4 1 1 2 1 2 3 2 4 2 3 1 1 4 4 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good job (1 test case)

Test #36:

score: 0
Accepted
time: 102ms
memory: 12164kb

input:

3
41788 214631 23661
12454 21501 16329 8928 13645 5571 16349 1632 9800 16695 23199 21059 10968 2356 12608 2449 13224 16878 21732 4643 6129 23018 15240 18596 4921 5646 21012 12275 14813 4984 1198 14397 12602 23270 17029 4810 13081 19632 13649 7302 14701 17969 20553 3665 2587 5469 3159 11699 10698 658...

output:

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

result:

ok good job (3 test cases)

Test #37:

score: 0
Accepted
time: 77ms
memory: 15460kb

input:

1
82735 300000 3
3 3 1 1 1 2 2 2 2 1 2 2 1 3 2 1 1 1 2 2 1 3 2 2 2 2 2 3 1 1 2 1 2 3 2 2 1 1 2 3 2 2 3 3 3 3 1 2 1 3 3 2 2 3 1 3 1 2 1 2 3 1 2 2 2 3 3 3 3 1 2 2 1 2 3 3 2 2 1 1 2 1 2 2 1 2 2 2 2 3 3 3 1 1 1 1 2 1 2 2 1 3 1 3 3 1 1 3 2 3 2 1 2 3 3 1 2 1 1 1 3 2 2 1 1 3 1 3 2 1 3 2 2 3 2 3 2 3 3 2 3 3...

output:

3 3 3 1 1 1 2 2 2 2 1 2 2 1 3 1 1 1 1 2 2 1 3 2 2 2 1 2 3 1 1 2 1 2 3 2 2 1 1 2 3 2 2 3 3 3 3 1 2 1 3 3 1 2 3 1 3 1 2 1 2 3 1 2 2 2 3 3 3 3 1 2 2 1 2 3 3 2 2 1 1 2 1 2 2 1 2 2 2 2 3 3 3 1 1 1 1 2 1 2 2 1 3 1 3 3 1 1 3 2 3 2 1 2 3 1 1 2 1 1 1 3 2 2 1 1 3 1 3 2 1 3 2 2 3 2 3 2 3 3 2 3 3 3 1 2 1 2 3 2 ...

result:

ok good job (1 test case)

Test #38:

score: 0
Accepted
time: 80ms
memory: 16080kb

input:

1
100000 300000 3
1 2 2 1 1 1 2 3 1 1 3 1 2 1 2 1 3 3 3 1 2 1 2 1 1 2 2 3 1 2 2 1 2 2 2 1 1 1 1 2 2 2 3 1 2 1 2 2 2 3 1 2 1 2 3 2 3 3 3 2 2 2 2 1 3 2 3 1 1 2 2 2 2 3 3 2 2 2 2 1 1 2 2 2 2 3 1 1 2 2 1 2 3 3 1 1 2 3 2 3 1 3 3 2 3 2 1 1 2 1 2 1 1 3 2 2 1 1 3 2 1 1 3 2 2 2 1 1 1 2 1 2 3 2 2 1 1 2 3 3 3 ...

output:

3 1 1 2 1 1 1 2 3 1 1 3 1 2 1 2 1 3 3 3 1 1 1 2 1 1 2 2 3 1 2 2 1 2 2 2 1 1 1 1 2 2 2 3 1 2 1 1 2 2 3 1 2 1 2 3 2 3 3 3 2 1 2 2 1 3 2 3 1 1 2 2 2 2 3 3 2 2 2 1 1 1 2 2 2 2 3 1 1 2 2 1 2 3 3 1 1 2 3 2 3 1 3 3 2 3 2 1 1 2 1 2 1 1 2 2 2 1 1 3 2 1 1 3 2 2 2 1 1 1 2 1 2 3 2 2 1 1 2 3 3 3 1 1 1 1 2 1 3 1 ...

result:

ok good job (1 test case)

Test #39:

score: 0
Accepted
time: 77ms
memory: 16152kb

input:

1
100000 300000 4
1 1 1 1 3 2 4 4 2 2 2 4 2 4 2 2 3 3 2 4 1 1 1 3 3 4 1 4 2 1 4 1 3 4 3 1 2 1 1 4 3 1 1 4 4 1 1 3 1 1 1 3 1 1 3 1 2 1 3 1 1 1 4 3 1 3 1 3 4 1 3 4 1 4 4 1 3 2 4 2 4 1 1 2 3 3 4 3 1 1 4 4 3 2 3 2 1 1 3 2 1 3 3 1 4 4 1 3 4 1 2 2 2 3 1 2 3 3 2 2 4 3 2 3 2 3 4 1 3 2 1 2 2 2 2 4 1 2 4 2 3 ...

output:

4 1 1 1 1 3 1 2 4 2 2 1 4 2 1 2 1 3 1 2 3 1 1 1 3 3 4 1 1 1 1 4 1 2 4 3 1 2 1 1 3 3 1 1 3 4 1 1 3 1 1 1 3 1 1 1 1 2 1 3 1 1 1 1 3 1 3 1 3 1 1 3 4 1 1 4 1 3 2 4 2 4 1 1 2 3 3 3 3 1 1 2 4 2 2 3 2 1 1 3 2 1 3 3 1 4 2 1 2 3 1 2 2 2 2 1 2 3 3 1 2 2 2 2 3 2 3 3 1 3 2 1 2 2 2 2 4 1 2 4 2 3 1 2 2 3 1 2 1 1 ...

result:

ok good job (1 test case)

Test #40:

score: 0
Accepted
time: 83ms
memory: 17692kb

input:

1
100000 300000 34719
32526 577 19390 1923 22779 19979 8794 32634 19898 33999 25503 18041 15604 16996 15704 30524 14084 17529 17302 3618 34047 34703 17185 10284 6885 33066 33359 4288 5686 19984 26656 4128 8297 5203 21686 24827 28339 33208 31277 33671 29355 15744 7304 14365 20768 9905 10219 24781 315...

output:

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

result:

ok good job (1 test case)

Test #41:

score: 0
Accepted
time: 86ms
memory: 17136kb

input:

1
100000 300000 64831
49877 44313 44185 29008 59448 59278 25732 36764 1579 30644 4402 46765 20103 3018 42338 2541 61937 26348 27438 28189 40898 23822 25295 37626 49171 15959 25725 2647 9924 63051 64494 28554 46797 11015 21169 1836 41223 31586 60684 16304 48191 52191 56598 15454 11178 30633 39720 374...

output:

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

result:

ok good job (1 test case)

Test #42:

score: 0
Accepted
time: 78ms
memory: 19408kb

input:

1
100000 300000 79565
18959 30475 20048 67071 14016 54012 50609 77702 3323 9995 16198 75043 4349 20194 32477 56352 59641 59384 19361 37179 41457 30966 37750 24564 55435 44456 12048 16470 40745 70268 43096 21573 38628 16212 17363 51503 22605 26547 22001 39664 39606 79479 15589 24576 42992 50475 4414 ...

output:

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

result:

ok good job (1 test case)

Test #43:

score: 0
Accepted
time: 73ms
memory: 16112kb

input:

1
100000 300000 3
2 3 1 1 2 1 2 1 1 3 3 1 1 1 1 1 3 1 1 1 2 2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 1 2 3 2 3 3 3 2 2 2 3 1 1 3 3 2 1 2 2 2 1 3 2 1 2 2 2 1 2 1 2 2 3 1 2 1 1 2 3 2 1 1 3 1 3 1 1 2 1 2 3 1 2 1 3 3 3 1 3 3 1 1 3 2 1 3 3 2 2 1 3 2 3 1 1 1 2 1 1 1 2 2 1 3 1 ...

result:

ok good job (1 test case)

Test #45:

score: 0
Accepted
time: 75ms
memory: 16012kb

input:

1
100000 300000 3
3 1 2 3 2 1 2 2 3 1 2 2 3 1 2 1 2 3 1 1 2 1 3 3 1 1 2 3 1 3 2 1 2 3 2 2 3 3 2 2 3 3 2 1 2 1 3 3 1 1 1 1 3 2 2 3 1 1 2 2 1 1 1 1 1 2 2 2 1 3 1 3 3 1 1 2 2 1 2 1 2 2 3 1 2 1 2 1 3 2 2 1 3 2 3 2 2 2 1 3 2 1 3 2 3 3 1 3 1 3 1 2 1 2 1 2 1 1 3 1 2 2 3 3 3 1 2 3 1 2 3 2 3 1 1 2 1 2 1 1 1 ...

output:

3 3 1 2 3 2 1 2 2 3 1 2 2 3 1 2 1 2 3 1 1 2 1 1 3 1 1 1 3 1 3 2 1 2 1 2 2 3 3 2 1 3 3 2 1 2 1 3 2 1 1 1 1 3 2 2 3 1 1 2 2 1 1 1 1 1 2 2 2 1 3 1 3 3 1 1 2 2 1 2 1 2 2 3 1 2 1 2 1 3 2 2 1 3 2 3 2 2 2 1 3 2 1 3 2 3 2 1 3 1 3 1 2 1 2 1 2 1 1 3 1 2 2 3 2 3 1 2 3 1 2 3 2 3 1 1 2 1 1 1 1 1 3 1 2 2 3 1 3 1 ...

result:

ok good job (1 test case)

Test #46:

score: 0
Accepted
time: 78ms
memory: 15060kb

input:

1
100000 300000 12380
10126 2733 5582 1746 5353 8026 9361 5083 4997 5945 7674 8987 4318 1058 1910 12343 11335 1903 129 1025 6084 9695 10752 7737 7504 1396 2769 11207 871 10740 6309 2264 2253 7252 6708 10858 1042 5976 9666 10535 4448 9203 12287 1072 7929 10327 7302 4708 9410 10179 8646 9301 6934 7740...

output:

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

result:

ok good job (1 test case)

Test #47:

score: 0
Accepted
time: 79ms
memory: 16620kb

input:

1
100000 300000 9270
8321 8236 9193 2193 3735 4971 3406 1257 8526 4259 7204 1108 5846 8514 8528 4379 8681 3009 7802 467 6743 8015 2600 5835 8521 4354 2865 852 3548 4325 6388 485 8982 6723 442 7676 6824 6544 7296 9152 4119 4421 1195 4025 3074 4625 8068 915 8224 7712 1914 4311 3503 2772 4207 2894 3540...

output:

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

result:

ok good job (1 test case)

Test #48:

score: 0
Accepted
time: 79ms
memory: 16028kb

input:

1
100000 300000 3
3 3 2 1 3 2 1 2 3 2 1 1 2 1 1 2 2 3 2 3 1 1 3 1 3 2 3 1 1 3 1 3 3 3 2 2 1 1 1 3 3 3 2 2 2 2 1 2 2 3 1 1 1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 2 1 2 2 1 3 1 2 2 1 2 2 1 3 4 3 1 3 2 2 2 2 4 1 1 5 3 1 3 1 3 2 5 2 3 3 5 3 5 1 4 5 1 3 2 3 1 1 1 2 1 3 3 4 ...

result:

ok good job (1 test case)

Test #50:

score: 0
Accepted
time: 75ms
memory: 14296kb

input:

1
100000 300000 4
3 4 2 4 3 4 4 4 2 2 4 1 3 1 3 2 2 3 3 1 3 2 4 1 4 3 2 3 1 3 4 2 2 2 4 3 2 1 2 3 2 2 1 1 2 2 4 3 1 3 1 2 2 4 2 1 3 1 1 1 3 1 3 2 3 3 4 4 1 4 2 1 4 2 2 2 1 2 2 4 3 3 2 4 3 3 3 2 2 2 1 2 1 4 2 2 3 1 1 2 2 4 4 3 4 2 4 2 3 2 3 1 3 3 3 2 3 4 2 2 4 3 1 3 2 4 3 2 1 1 2 4 4 1 3 2 1 1 2 3 4 ...

output:

4 1 3 2 4 3 2 4 4 1 2 4 1 3 1 3 2 2 2 3 1 3 2 3 1 4 3 2 3 1 3 1 2 2 2 1 3 1 1 2 3 2 2 1 1 2 2 4 3 1 2 1 1 2 3 1 1 3 1 1 1 1 1 3 2 3 3 2 1 1 2 2 1 4 2 1 2 1 2 1 3 3 3 2 1 1 3 3 1 2 1 1 1 1 4 2 2 3 1 1 2 2 4 4 2 3 1 4 2 3 1 2 1 3 3 3 2 3 4 2 2 2 3 1 3 2 4 3 1 1 1 2 2 4 1 3 2 1 1 2 2 3 2 1 2 1 1 1 1 2 ...

result:

ok good job (1 test case)

Test #51:

score: 0
Accepted
time: 76ms
memory: 16160kb

input:

1
100000 300000 2
2 1 2 1 1 1 2 1 1 1 2 1 1 2 1 2 1 1 1 1 2 2 2 2 1 1 1 2 1 1 1 2 2 2 2 2 1 1 2 1 1 2 2 1 2 2 2 1 1 1 2 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 1 2 2 1 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2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 2 1 5 4 4 ...

result:

ok good job (1 test case)

Test #53:

score: 0
Accepted
time: 76ms
memory: 14260kb

input:

1
100000 300000 2
2 2 2 2 2 1 2 1 2 1 1 2 1 1 2 1 1 2 2 1 2 1 2 2 1 2 1 2 2 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 2 1 1 2 1 1 2 2 2 2 2 2 1 1 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1 1 2 1 2 2 1 1 2 2 2 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 1 2 1 2 2 2 1 1 1 2 2 2 1 2 1 2 2 2 2 1 2 2 2 1 1 1 1 2 2 2 1 2 1 1 2 2 2 2 ...

output:

2 2 2 2 2 2 1 2 1 2 1 1 2 1 1 2 1 1 2 2 1 2 1 2 2 1 2 1 2 2 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 2 1 1 2 1 1 2 2 2 2 2 2 1 1 2 2 2 2 2 1 2 2 1 2 2 2 2 1 1 1 2 1 2 2 1 1 2 2 2 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 1 2 1 2 2 1 1 1 1 2 2 2 1 2 1 2 2 2 2 1 2 2 2 1 1 1 1 2 2 2 1 2 1 1 2 2 2 2 1 1 1 2 1 1 2 1 ...

result:

ok good job (1 test case)

Test #54:

score: 0
Accepted
time: 78ms
memory: 16476kb

input:

1
100000 300000 4
4 1 4 4 4 3 3 2 1 2 3 4 3 2 4 1 3 3 3 1 1 4 4 1 1 4 4 4 1 3 4 2 1 3 2 2 4 4 1 2 2 3 1 4 3 4 3 2 3 2 1 4 4 3 4 1 2 4 1 4 2 2 3 3 4 4 1 1 3 2 2 4 1 4 2 2 4 3 2 2 2 3 4 3 1 1 1 1 3 4 2 3 4 3 2 1 1 4 2 1 2 1 2 3 3 1 4 4 4 3 4 2 3 4 4 1 4 4 4 4 3 4 3 2 3 2 4 1 1 1 1 4 1 1 3 4 4 3 3 3 1 ...

output:

4 4 1 2 4 4 3 3 2 1 2 2 4 3 2 4 1 3 3 1 1 1 3 4 1 1 3 4 3 1 2 4 2 1 1 2 2 4 4 1 2 2 3 1 4 3 4 3 2 3 2 1 1 4 3 4 1 2 4 1 3 2 2 3 2 2 4 1 1 1 2 2 2 1 4 2 1 4 3 2 2 2 3 4 3 1 1 1 1 1 3 2 3 4 3 2 1 1 4 2 1 2 1 2 3 3 1 1 4 4 3 4 2 3 3 4 1 4 2 4 3 3 3 3 2 3 2 3 1 1 1 1 1 1 1 1 2 3 3 3 3 1 1 4 1 1 1 2 1 1 ...

result:

ok good job (1 test case)

Test #55:

score: 0
Accepted
time: 75ms
memory: 16412kb

input:

1
100000 300000 5
1 3 5 2 5 1 1 4 3 5 4 5 2 1 5 3 5 1 1 4 5 4 3 2 4 2 3 2 5 3 5 1 4 1 5 5 1 4 1 3 1 2 2 5 2 5 4 2 4 5 1 5 4 1 3 5 3 4 4 5 3 2 5 5 4 2 4 5 5 5 1 1 4 1 3 1 1 3 2 5 4 1 1 2 3 5 2 2 4 5 3 1 3 4 2 1 3 3 1 4 3 1 5 2 3 5 4 5 3 2 4 1 5 2 5 5 1 1 1 1 4 3 3 3 4 3 1 3 4 3 2 2 3 5 5 2 5 2 1 2 3 ...

output:

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

result:

ok good job (1 test case)

Test #56:

score: 0
Accepted
time: 149ms
memory: 33336kb

input:

1
296799 300000 213685
86099 159588 138902 93725 195387 97846 20737 45184 158792 103625 2481 54023 52522 6834 12309 102317 8872 24146 148974 16377 3164 12159 176717 212755 117413 144381 159439 121653 152642 129495 206631 32047 174988 146774 107360 196940 73817 105526 196972 137546 35405 23163 138491...

output:

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

result:

ok good job (1 test case)

Test #57:

score: 0
Accepted
time: 107ms
memory: 22128kb

input:

1
233959 300000 4
1 4 4 3 4 3 3 1 1 2 3 3 1 2 4 3 4 4 3 2 3 2 3 1 1 1 4 1 3 4 3 3 1 3 4 2 1 4 4 1 1 3 4 4 2 1 2 1 1 3 4 3 4 4 3 2 1 2 1 1 2 2 2 2 2 3 3 3 4 2 4 1 2 2 2 1 2 4 4 4 1 4 2 4 3 1 1 4 3 2 2 1 1 1 3 1 1 3 2 1 2 4 3 4 4 1 3 3 4 3 1 4 4 3 2 3 4 4 4 3 4 3 2 1 3 2 4 1 1 4 3 1 1 4 3 3 2 3 2 3 2 ...

output:

4 1 4 3 1 3 2 2 1 1 1 2 2 1 1 2 3 3 2 3 2 2 2 1 1 1 1 2 1 2 3 1 1 1 2 3 1 1 2 1 1 1 1 1 3 1 1 1 1 1 1 1 3 3 1 2 1 1 2 1 1 1 2 1 1 1 2 3 1 1 1 1 1 2 2 1 1 2 1 2 3 1 3 2 1 2 1 1 3 2 1 1 1 1 1 2 1 1 1 1 1 2 1 2 3 2 1 2 2 1 2 1 1 2 1 2 2 2 2 3 3 2 1 1 1 2 2 3 1 1 2 1 1 1 4 2 3 2 3 2 2 2 3 3 1 1 3 2 2 3 ...

result:

ok good job (1 test case)

Test #58:

score: 0
Accepted
time: 76ms
memory: 15904kb

input:

1
89583 300000 8
4 1 4 3 5 1 5 4 3 3 2 2 1 2 5 2 4 7 4 6 6 6 7 5 7 8 4 4 5 3 4 1 6 5 2 1 1 5 5 5 7 3 6 1 1 5 7 3 6 5 3 3 1 7 6 5 1 3 4 1 3 2 4 8 2 3 3 3 6 5 5 8 6 4 5 4 3 8 8 4 8 8 2 6 5 2 1 8 3 3 8 4 5 7 3 6 6 2 1 5 7 5 5 8 6 3 7 4 5 8 5 5 4 3 7 2 8 5 3 7 8 2 7 5 7 6 7 2 1 1 3 3 7 1 7 4 8 3 5 8 1 6...

output:

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

result:

ok good job (1 test case)

Test #59:

score: 0
Accepted
time: 97ms
memory: 17524kb

input:

1
123406 300000 49302
5552 15387 32129 23624 37138 33292 37753 30610 35069 48458 7811 48492 12524 2793 22199 38447 12327 3564 43227 41539 49118 48267 15101 47188 46229 27461 17772 35447 10588 46929 19360 25174 46620 29667 26276 34240 41570 34306 1349 43154 9874 8377 19907 978 41310 35979 24905 14374...

output:

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

result:

ok good job (1 test case)

Test #60:

score: 0
Accepted
time: 86ms
memory: 16428kb

input:

1
105965 300000 33639
16925 10238 16704 3697 26367 20540 26919 32060 20291 11020 4499 14074 19456 27510 29286 32299 22152 20478 13072 15808 21087 18990 5938 23036 16709 26183 25354 26367 7882 19700 27458 16830 29993 24758 9767 1228 12350 22570 15784 25721 13784 32467 14995 23825 20052 10617 14424 17...

output:

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

result:

ok good job (1 test case)

Test #61:

score: 0
Accepted
time: 183ms
memory: 33540kb

input:

1
299313 300000 215667
193818 106802 31419 214463 197012 209936 171008 94024 90175 14428 48730 120714 163958 73539 117736 206662 111215 31407 100212 53755 169337 17744 161866 53097 195950 194163 20322 59291 140800 163147 49663 180559 27232 35514 204573 180792 168030 82977 42843 129722 75396 176929 1...

output:

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

result:

ok good job (1 test case)

Test #62:

score: 0
Accepted
time: 115ms
memory: 23424kb

input:

1
278379 300000 5
4 5 4 5 4 5 3 1 2 4 4 2 1 4 1 4 3 4 5 4 4 4 3 2 1 1 3 5 2 4 3 4 3 1 3 4 3 5 4 2 1 5 1 1 2 5 4 3 2 4 5 2 2 2 3 1 5 4 5 1 2 5 1 2 2 5 3 3 3 2 3 3 3 3 2 4 4 2 1 2 2 1 1 3 5 4 4 1 1 4 3 4 4 5 3 3 3 3 4 3 2 5 4 5 2 2 4 3 2 2 4 2 3 5 1 1 2 4 5 3 5 5 2 3 4 2 4 1 5 2 1 2 5 3 1 2 3 4 2 3 1 ...

output:

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

result:

ok good job (1 test case)

Test #63:

score: 0
Accepted
time: 74ms
memory: 14840kb

input:

1
71881 300000 3
3 2 1 3 1 1 1 2 1 2 3 1 3 1 2 2 3 1 1 3 2 1 2 1 2 1 2 2 3 3 3 3 2 1 1 1 1 2 1 1 2 1 3 2 3 1 1 1 3 1 1 3 1 1 1 3 3 3 2 2 3 3 3 1 3 2 3 2 2 3 1 3 3 1 2 3 2 1 1 1 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