QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#259769#5263. Pociąg towarowymikefeng100 ✓106ms36832kbC++141.7kb2023-11-21 13:24:282023-11-21 13:24:29

Judging History

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

  • [2023-11-21 13:24:29]
  • 评测
  • 测评结果:100
  • 用时:106ms
  • 内存:36832kb
  • [2023-11-21 13:24:28]
  • 提交

answer

bool M1;
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdlib>
#include<climits>
#include<iomanip>
#include<cassert>
#include<random>
#include<cstdio>
#include<vector>
#include<bitset>
#include<stack>
#include<queue>
#include<deque>
#include<cmath>
#include<ctime>
#include<map>
#include<set>
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
//#include<ext/pb_ds/priority_queue.hpp>
#define fi first
#define se second
#define LD double
#define ll long long
#define Vector Point
#define I128 __int128
#define ull unsigned ll
#define pii pair<int,int>
#define pb(x) push_back(x)
#define syt cerr<<"sytakioi\n"
#define F(i,a,b) for(int i=a,i##end=b;i<=i##end;++i)
#define UF(i,a,b) for(int i=a,i##end=b;i>=i##end;--i)
#define look_memory cerr<<abs(&M2-&M1)/1024.0/1024<<'\n'
#define rd_i(l,r) uniform_int_distribution<int>(l,r)(rd)
#define rd_r(l,r) uniform_real_distribution<double>(l,r)(rd)
#define look_time cerr<<(clock()-Time)*1.0/CLOCKS_PER_SEC<<'\n'
using namespace std;
//using namespace __gnu_cxx;
mt19937 rd(time(0));
const int N=3e5+5;
int n,m,k;
int a[N],b[N];
int f[N],g[N];
set<int> s[N];
/*
g[i+1]-1 f[i-1]+1之间有a[i] 
*/
bool M2;
int main(){
	int Time=clock();
	look_memory;
	cin.tie(nullptr)->sync_with_stdio(false);
	cin>>n>>m>>k;
	F(i,1,n) cin>>a[i];
	F(i,1,m) cin>>b[i],s[b[i]].emplace(i);
	int l=1;
	F(i,1,n){
		if(a[i]==b[l]) ++l;
		f[i]=l-1;
	}
	g[n+1]=m+1;
	l=m;
	UF(i,n,1){
		if(a[i]==b[l]) --l;
		g[i]=l+1;
	}
	F(i,1,n){
		int l=g[i+1]-1,r=f[i-1]+1;
//		cout<<l<<' '<<r<<'\n';
		auto it=s[a[i]].lower_bound(l);
		if(it!=s[a[i]].end()&&*it<=r) cout<<"1 ";
		else cout<<"0 ";
	}
	cout<<'\n';
	look_time;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

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

input:

1 1 100000
100000
100000

output:

1 

result:

ok 1 number(s): "1"

Test #2:

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

input:

2 1 100000
100000 99999
99999

output:

0 1 

result:

ok 2 number(s): "0 1"

Test #3:

score: 0
Accepted
time: 0ms
memory: 22512kb

input:

5 1 5
1 2 3 4 5
3

output:

0 0 1 0 0 

result:

ok 5 number(s): "0 0 1 0 0"

Test #4:

score: 0
Accepted
time: 0ms
memory: 22268kb

input:

3 2 1
1 1 1
1 1

output:

1 1 1 

result:

ok 3 number(s): "1 1 1"

Test #5:

score: 0
Accepted
time: 0ms
memory: 22440kb

input:

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

output:

1 1 1 1 1 

result:

ok 5 number(s): "1 1 1 1 1"

Test #6:

score: 0
Accepted
time: 0ms
memory: 22700kb

input:

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

output:

0 0 0 0 1 0 0 0 1 0 

result:

ok 10 numbers

Test #7:

score: 0
Accepted
time: 0ms
memory: 22116kb

input:

9 3 3
1 2 3 1 2 3 1 2 3
3 2 1

output:

0 0 1 0 1 0 1 0 0 

result:

ok 9 numbers

Test #8:

score: 0
Accepted
time: 2ms
memory: 21936kb

input:

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

output:

1 0 1 0 1 0 1 0 1 0 0 

result:

ok 11 numbers

Test #9:

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

input:

9 3 4
1 2 3 4 4 4 1 2 3
4 4 4

output:

0 0 0 1 1 1 0 0 0 

result:

ok 9 numbers

Test #10:

score: 0
Accepted
time: 0ms
memory: 21112kb

input:

9 3 4
1 2 3 4 4 4 1 2 3
1 2 3

output:

1 1 1 0 0 0 1 1 1 

result:

ok 9 numbers

Test #11:

score: 0
Accepted
time: 0ms
memory: 21260kb

input:

9 2 4
1 2 3 4 4 4 1 2 3
2 2

output:

0 1 0 0 0 0 0 1 0 

result:

ok 9 numbers

Test #12:

score: 0
Accepted
time: 0ms
memory: 22228kb

input:

8 3 2
1 2 1 2 1 2 1 2
2 2 2

output:

0 1 0 1 0 1 0 1 

result:

ok 8 numbers

Test #13:

score: 0
Accepted
time: 0ms
memory: 22204kb

input:

8 4 2
1 2 1 2 1 2 1 2
1 2 2 1

output:

1 1 1 1 1 1 1 0 

result:

ok 8 numbers

Test #14:

score: 0
Accepted
time: 0ms
memory: 21588kb

input:

8 5 2
1 2 1 2 1 2 1 2
1 2 2 2 1

output:

1 1 0 1 0 1 1 0 

result:

ok 8 numbers

Test #15:

score: 0
Accepted
time: 3ms
memory: 20676kb

input:

1 1 100000
1
1

output:

1 

result:

ok 1 number(s): "1"

Test #16:

score: 0
Accepted
time: 3ms
memory: 21896kb

input:

100 20 4
3 2 1 1 2 2 3 3 2 2 1 4 1 1 3 2 1 2 1 2 2 1 1 3 4 2 4 4 1 4 1 2 4 4 4 2 4 4 2 3 1 4 2 4 3 3 1 2 2 1 2 1 2 4 3 2 1 4 4 3 2 1 1 1 2 4 4 3 1 3 2 2 2 3 1 1 1 1 1 2 1 2 3 2 2 3 1 1 1 1 1 2 3 2 3 1 4 2 3 2
1 3 3 4 1 1 3 3 4 2 2 4 1 1 3 1 3 3 3 3

output:

0 0 1 1 0 0 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 

result:

ok 100 numbers

Test #17:

score: 0
Accepted
time: 3ms
memory: 20744kb

input:

100 50 2
1 2 2 1 1 2 1 2 2 2 1 1 2 1 2 2 2 1 2 2 2 1 2 1 1 2 1 1 2 2 1 2 1 1 1 2 1 2 1 1 2 2 2 2 2 1 2 2 1 1 2 1 1 2 1 2 2 1 2 1 1 2 1 1 2 2 2 2 1 2 2 2 2 1 1 1 2 1 1 1 1 1 1 1 1 2 1 2 2 1 1 2 1 1 1 2 1 2 2 1
1 1 2 1 2 2 1 1 2 1 2 2 1 1 1 2 2 1 2 2 2 2 2 1 1 1 1 1 2 2 2 2 1 2 2 1 1 1 2 2 1 2 1 1 2 1...

output:

1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 

result:

ok 100 numbers

Test #18:

score: 0
Accepted
time: 0ms
memory: 22452kb

input:

100 21 5
2 2 2 4 4 1 1 2 1 5 2 4 3 3 1 4 4 3 1 3 2 4 2 5 1 3 5 2 5 2 2 3 1 2 1 3 2 4 1 5 4 2 5 5 2 4 2 3 2 3 5 5 5 5 5 2 1 1 3 5 3 5 2 2 2 2 5 2 1 1 3 1 5 1 1 2 5 4 1 3 2 1 2 5 5 4 3 5 5 3 4 1 5 5 2 4 3 2 5 5
4 3 3 4 3 4 3 2 3 3 5 2 4 5 2 5 3 2 5 5 2

output:

0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 1 0 0 1 0 0 

result:

ok 100 numbers

Test #19:

score: 0
Accepted
time: 0ms
memory: 21632kb

input:

100 80 5
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
1 2 3 4 5 1 4 5 2 3 4 5 1 2 3 4 5 1 4 1 2 3 4 5 1 4 5 1 2 4 5 1 2 3 4 5 1 2 4 1 3 4 5 1 2 3...

output:

1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 

result:

ok 100 numbers

Test #20:

score: 0
Accepted
time: 3ms
memory: 20664kb

input:

100 20 5
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
5 4 3 2 1 5 4 3 2 1 5 4 3 2 1 5 4 3 2 1

output:

0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 

result:

ok 100 numbers

Test #21:

score: 0
Accepted
time: 0ms
memory: 21828kb

input:

100 50 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2
1 1 2 2 2 1 1 1 2 2 2 2 1 2 1 1 2 2 1 2 1 2 1 1 2 2 2 2 1 1 2 1 1 2 1 1 1 1 2 1 1 2 1 2 1 1...

output:

1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 

result:

ok 100 numbers

Test #22:

score: 0
Accepted
time: 3ms
memory: 21064kb

input:

100 15 5
4 3 5 5 1 4 5 1 5 2 1 1 1 4 2 1 1 4 4 5 3 5 5 1 1 3 5 2 2 4 4 2 4 4 3 5 5 4 1 4 3 1 4 2 3 4 3 2 2 4 1 5 3 5 4 5 4 1 3 1 3 4 1 4 5 4 5 1 4 5 1 1 5 4 3 1 2 1 5 2 4 3 4 2 3 4 5 3 3 1 5 5 5 1 2 4 2 4 1 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

output:

0 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 

result:

ok 100 numbers

Test #23:

score: 0
Accepted
time: 0ms
memory: 21560kb

input:

100 5 6
1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5 6 2 1 3 4 5
1 2 3 4 5

output:

1 0 0 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 

result:

ok 100 numbers

Test #24:

score: 0
Accepted
time: 3ms
memory: 21968kb

input:

100 15 5
2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3 2 5 4 1 3
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

output:

0 0 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 0 0 

result:

ok 100 numbers

Test #25:

score: 0
Accepted
time: 2ms
memory: 22436kb

input:

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

output:

0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 

result:

ok 100 numbers

Test #26:

score: 0
Accepted
time: 4ms
memory: 22484kb

input:

100 20 100
71 9 71 73 3 16 74 50 28 27 73 65 64 20 66 87 22 50 89 59 48 4 81 30 97 1 37 3 93 10 19 7 34 10 64 13 60 23 69 45 87 97 9 77 90 61 100 59 12 63 32 16 38 55 58 36 32 86 10 74 73 95 52 82 26 68 34 90 85 35 62 2 93 58 77 100 31 9 81 72 82 20 47 82 94 14 58 37 41 85 74 74 28 96 56 1 95 6 28 2...

output:

0 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 

result:

ok 100 numbers

Test #27:

score: 0
Accepted
time: 0ms
memory: 22120kb

input:

100 10 20
3 2 6 20 15 4 18 5 14 7 19 11 13 17 16 1 3 10 8 12 9 1 6 20 15 4 18 5 14 7 19 11 13 17 16 2 3 10 8 12 9 2 6 20 15 4 19 5 14 7 19 11 13 17 16 1 3 10 8 12 9 8 6 20 15 4 18 5 14 7 18 5 13 17 16 1 3 10 8 12 9 2 6 20 15 4 18 11 14 7 19 11 13 17 16 1 9 10 2 12
18 5 15 5 2 1 5 16 3 10

output:

0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 

result:

ok 100 numbers

Test #28:

score: 0
Accepted
time: 0ms
memory: 20916kb

input:

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

output:

1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 100 numbers

Subtask #2:

score: 20
Accepted

Test #29:

score: 20
Accepted
time: 0ms
memory: 22104kb

input:

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

output:

0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 ...

result:

ok 2000 numbers

Test #30:

score: 0
Accepted
time: 0ms
memory: 22104kb

input:

2000 1000 2
1 1 1 1 2 2 1 1 2 1 2 2 1 1 2 1 1 2 1 2 1 1 1 2 2 1 1 2 1 1 2 2 2 2 1 1 2 1 2 1 1 1 1 1 2 2 1 2 2 2 1 2 2 2 1 2 1 1 2 1 1 1 2 1 1 2 1 1 1 2 1 1 2 1 2 1 2 1 2 2 1 1 1 2 1 2 2 2 2 2 2 2 1 1 2 2 1 2 1 2 1 2 1 2 2 1 1 1 1 1 2 2 1 2 2 2 1 2 2 1 1 1 1 1 1 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 1 2 2 2 ...

output:

0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 2000 numbers

Test #31:

score: 0
Accepted
time: 0ms
memory: 21260kb

input:

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

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 2000 numbers

Test #32:

score: 0
Accepted
time: 0ms
memory: 22300kb

input:

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

output:

1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 ...

result:

ok 2000 numbers

Test #33:

score: 0
Accepted
time: 0ms
memory: 21584kb

input:

2000 500 20
12 18 20 4 13 11 5 8 19 2 6 3 10 17 16 7 15 14 1 9 12 18 20 4 13 11 5 8 19 2 6 3 10 17 16 7 15 14 1 9 12 18 20 4 13 11 5 8 19 2 6 3 10 17 16 7 15 14 1 9 12 18 20 4 13 11 5 8 19 2 6 3 10 17 16 7 15 14 1 9 12 18 20 4 13 11 5 8 19 2 6 3 10 17 16 7 15 14 1 9 12 18 20 4 13 11 5 8 19 2 6 3 10 ...

output:

0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 0 0 0 0 1 ...

result:

ok 2000 numbers

Test #34:

score: 0
Accepted
time: 0ms
memory: 22540kb

input:

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

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 2000 numbers

Test #35:

score: 0
Accepted
time: 0ms
memory: 22208kb

input:

2000 120 30
12 24 8 4 11 5 15 25 23 9 14 13 1 27 30 21 17 7 20 19 16 26 18 28 22 3 2 10 6 29 12 24 8 4 11 5 15 25 23 9 14 13 1 27 30 21 17 7 20 19 16 26 18 28 22 3 2 10 6 29 12 24 8 4 11 5 15 25 23 9 14 13 1 27 30 21 17 7 20 19 16 26 18 28 22 3 2 10 6 29 12 24 8 4 11 5 15 25 23 9 14 13 1 27 30 21 17...

output:

0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 ...

result:

ok 2000 numbers

Test #36:

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

input:

2000 40 40
22 14 39 11 12 33 23 4 26 2 6 7 35 32 17 38 1 16 13 5 28 31 10 27 37 14 9 19 18 15 7 36 8 34 3 24 29 25 20 40 22 21 39 11 12 33 23 4 26 2 6 7 35 32 17 38 1 16 13 5 28 31 10 27 37 14 9 19 18 15 30 36 8 34 3 24 29 25 20 40 22 21 39 11 12 33 23 4 26 2 6 7 35 32 17 38 1 16 13 5 28 31 10 27 37...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 ...

result:

ok 2000 numbers

Test #37:

score: 0
Accepted
time: 0ms
memory: 22332kb

input:

2000 500 2000
785 645 159 1080 1563 1665 989 1548 1499 1621 765 792 1961 1586 962 914 1622 1464 453 324 195 1226 77 1914 1807 1065 943 738 1756 403 504 1593 1766 1176 1622 1986 1460 320 923 1888 186 553 141 1204 1023 1904 1412 582 1966 230 760 71 651 640 247 425 404 10 3 606 1807 1698 980 474 1258 3...

output:

0 0 1 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 0 1 0 1 1 0 ...

result:

ok 2000 numbers

Test #38:

score: 0
Accepted
time: 0ms
memory: 21780kb

input:

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

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 2000 numbers

Test #39:

score: 0
Accepted
time: 0ms
memory: 21008kb

input:

2000 1999 2000
138 1367 383 1791 795 1768 809 1393 1217 1800 1873 1514 726 1808 1826 1341 1269 204 1653 299 505 28 671 1360 1440 1986 718 1648 268 686 264 1897 131 123 153 975 958 413 574 1898 691 633 358 941 4 372 1899 731 259 988 1049 1493 1646 1953 996 930 1892 370 1849 521 620 355 1870 382 1758 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2000 numbers

Subtask #3:

score: 15
Accepted

Test #40:

score: 15
Accepted
time: 60ms
memory: 36796kb

input:

300000 300000 300000
199487 250811 5333 152816 62649 13727 57135 266756 117667 122454 213963 202793 222398 107858 36438 166385 67442 80498 221043 259141 237970 80607 150543 87806 145868 220683 74660 296905 281807 56936 241184 52507 138022 62923 123117 298640 24027 212431 85651 177999 114506 291950 2...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 300000 numbers

Test #41:

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

input:

300000 299999 300000
96418 239269 189936 160849 226811 260787 76546 171227 271876 21533 221165 179387 32203 181489 292329 205228 80524 107068 105187 76551 27912 169843 46055 25961 217318 2182 288105 11873 15766 185350 149189 93741 220735 265723 51269 71822 226574 204147 238028 292059 139518 254188 2...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 300000 numbers

Test #42:

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

input:

300000 240000 300000
89988 210081 219346 14042 209085 112224 169856 140125 126987 257169 192432 295877 229988 65105 35852 118423 147729 155892 131937 230936 77227 280888 102158 180096 22546 38936 265632 180699 229295 229787 66221 7807 153913 181807 134958 46138 198102 38815 225149 41448 179780 21097...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 0 ...

result:

ok 300000 numbers

Test #43:

score: 0
Accepted
time: 45ms
memory: 29672kb

input:

300000 148000 300000
97749 185718 48551 98115 81706 71393 218060 174104 38384 5928 289908 76244 167851 265876 171760 71089 129135 79831 120909 264067 127271 92462 116101 173585 117650 203864 279302 261516 78767 132594 23292 202567 201101 71119 99323 110150 100932 292248 208179 248107 201793 58791 65...

output:

1 1 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 0 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 1 ...

result:

ok 300000 numbers

Test #44:

score: 0
Accepted
time: 24ms
memory: 22836kb

input:

300000 2000 300000
152331 258885 226797 206194 176049 137460 129068 129890 56411 114247 211984 145939 234220 145689 87450 296589 28994 241402 85416 73173 115223 187403 18453 217145 11883 60940 120085 282432 142579 258078 162154 220562 132025 275233 214876 70348 98272 160762 147421 83026 161137 18459...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #45:

score: 0
Accepted
time: 26ms
memory: 22740kb

input:

300000 100 300000
28323 244430 221814 44842 148759 209485 75486 266201 15578 228828 139285 187072 89352 117424 11783 150246 68834 130180 6013 53260 299765 259118 93645 62851 272178 295891 144383 173828 53529 208446 84554 312 51607 46671 290764 147228 90284 151191 111149 1945 113843 152861 35119 1883...

output:

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

result:

ok 300000 numbers

Test #46:

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

input:

300000 299999 300000
29018 299451 91137 31146 43349 223764 137701 70037 11554 42651 173118 256911 251089 297964 28859 238992 15379 13952 98054 51545 186142 293437 237878 297440 37385 285607 91622 135580 247529 166735 13400 10260 68042 154746 113376 107626 113565 125175 72283 222707 290314 224787 948...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 300000 numbers

Test #47:

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

input:

300000 299999 300000
29018 299451 91137 31146 43349 223764 137701 70037 11554 42651 173118 256911 251089 297964 28859 238992 15379 13952 98054 51545 186142 293437 237878 297440 37385 285607 91622 135580 247529 166735 13400 10260 68042 154746 113376 107626 113565 125175 72283 222707 290314 224787 948...

output:

0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 300000 numbers

Subtask #4:

score: 50
Accepted

Test #48:

score: 50
Accepted
time: 59ms
memory: 29764kb

input:

300000 149900 2
2 1 2 2 1 2 2 2 2 2 1 2 1 1 2 2 1 1 1 2 2 2 2 2 2 1 1 2 2 2 1 1 2 1 2 2 1 1 1 1 2 2 1 1 1 1 2 1 1 2 1 2 2 1 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1 2 2 2 2 2 2 2 2 1 1 2 2 2 1 1 1 1 1 2 1 2 1 2 2 2 2 2 2 1 1 2 2 1 2 2 1 2 2 1 1 1 2 2 1 2 2 1 1 2 2 2 2 1 1 1 1 1 1 2 2 2 1 2 1 2 2 2 1 2 1 1 ...

output:

1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 300000 numbers

Test #49:

score: 0
Accepted
time: 30ms
memory: 24048kb

input:

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

output:

0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 300000 numbers

Test #50:

score: 0
Accepted
time: 22ms
memory: 22792kb

input:

300000 1200 200
8 95 40 90 196 68 169 171 163 45 197 137 52 34 23 174 199 42 123 141 38 39 105 166 104 35 183 188 187 118 152 91 6 183 89 75 64 16 157 54 28 122 179 50 166 87 33 16 63 78 89 32 188 96 85 157 77 19 12 64 135 83 173 35 69 144 44 59 45 38 123 124 67 165 160 140 18 29 130 82 174 16 98 16...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #51:

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

input:

300000 45 1000
426 553 290 856 972 857 27 467 364 672 962 591 308 81 722 518 956 992 409 277 754 9 690 908 2 335 227 625 290 794 928 747 177 574 393 516 14 841 261 234 631 599 212 573 429 805 804 286 929 615 436 371 230 319 524 85 136 345 136 112 137 524 603 308 205 710 729 639 928 116 479 187 494 7...

output:

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

result:

ok 300000 numbers

Test #52:

score: 0
Accepted
time: 20ms
memory: 22820kb

input:

300000 3002 100
21 68 99 40 37 86 24 64 7 29 62 84 33 77 86 70 71 74 59 92 43 96 15 20 85 10 16 38 85 92 74 85 40 82 39 24 29 37 22 88 39 47 99 61 73 48 23 78 62 76 78 53 21 84 10 28 82 44 51 68 84 21 24 74 49 27 91 9 79 34 43 87 64 30 86 10 64 68 18 79 41 12 12 13 49 85 11 25 45 84 68 20 34 48 20 1...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #53:

score: 0
Accepted
time: 19ms
memory: 22736kb

input:

300000 200 300
204 164 237 230 233 259 183 60 224 48 196 84 96 126 242 226 98 70 297 30 243 164 168 250 66 14 3 152 210 102 287 62 149 214 299 263 225 225 235 115 152 150 172 133 78 251 191 29 163 81 248 90 41 104 163 20 279 203 287 246 194 50 42 285 160 214 25 156 191 269 241 153 144 269 160 282 28...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #54:

score: 0
Accepted
time: 30ms
memory: 22796kb

input:

300000 8002 40
25 21 12 23 22 7 30 38 35 15 4 29 18 17 9 6 5 36 9 23 27 37 11 12 23 21 17 10 37 26 6 15 19 39 15 12 8 14 10 19 17 9 5 14 1 18 19 17 23 17 13 25 39 12 33 18 10 26 35 11 32 34 4 27 19 38 23 36 37 36 4 22 18 26 12 25 37 4 35 34 35 4 6 26 6 21 22 17 14 19 1 23 36 8 2 9 7 17 18 40 18 33 3...

output:

0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 ...

result:

ok 300000 numbers

Test #55:

score: 0
Accepted
time: 32ms
memory: 23852kb

input:

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

output:

0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1 0 0 0 ...

result:

ok 300000 numbers

Test #56:

score: 0
Accepted
time: 39ms
memory: 25256kb

input:

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

output:

1 0 0 1 1 1 0 1 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 ...

result:

ok 300000 numbers

Test #57:

score: 0
Accepted
time: 106ms
memory: 35268kb

input:

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

output:

1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 ...

result:

ok 300000 numbers

Test #58:

score: 0
Accepted
time: 34ms
memory: 24328kb

input:

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

output:

0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 ...

result:

ok 300000 numbers

Test #59:

score: 0
Accepted
time: 17ms
memory: 22232kb

input:

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

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #60:

score: 0
Accepted
time: 52ms
memory: 29364kb

input:

300000 150000 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 ...

output:

0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 300000 numbers

Test #61:

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

input:

300000 149000 2
2 1 1 2 2 2 1 1 2 2 2 1 2 2 2 2 1 2 1 1 1 1 2 1 2 2 1 2 1 1 1 1 2 1 1 1 2 1 1 2 1 1 2 1 2 1 1 2 2 1 2 1 2 1 1 1 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 1 2 2 1 1 1 2 2 2 1 1 1 2 1 1 2 1 2 1 2 2 1 2 1 2 2 2 2 2 1 2 2 1 1 1 1 1 1 1 2 1 1 2 2 2 2 1 2 2 2 1 1 2 2 1 2 2 2 2 2 2 1 1 1 1 1 2 2 2 1 ...

output:

0 1 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 1 0 ...

result:

ok 300000 numbers

Test #62:

score: 0
Accepted
time: 20ms
memory: 22996kb

input:

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

output:

0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #63:

score: 0
Accepted
time: 17ms
memory: 22768kb

input:

300000 600 100
56 23 29 44 12 70 77 40 89 41 100 72 96 27 33 30 74 97 26 45 53 73 15 64 71 57 46 98 83 51 81 52 19 11 20 27 85 65 69 31 80 58 25 60 14 86 37 65 94 7 75 38 82 49 63 5 55 87 6 34 99 91 95 42 24 8 11 35 48 10 62 66 71 17 18 87 22 76 74 4 67 13 54 78 28 79 1 39 93 47 32 43 3 92 6 88 36 6...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #64:

score: 0
Accepted
time: 20ms
memory: 22764kb

input:

300000 800 300
42 219 9 108 216 127 231 118 151 102 222 16 96 299 236 177 159 52 136 37 41 261 264 226 257 190 3 274 183 59 27 13 85 300 70 10 90 250 56 65 109 273 88 81 258 106 29 14 181 120 174 218 235 6 138 82 259 145 4 171 125 69 175 57 268 195 210 276 270 234 232 284 132 31 199 78 246 225 180 1...

output:

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

result:

ok 300000 numbers

Test #65:

score: 0
Accepted
time: 26ms
memory: 23196kb

input:

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

output:

0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 ...

result:

ok 300000 numbers

Test #66:

score: 0
Accepted
time: 19ms
memory: 22736kb

input:

300000 2 300000
300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 3000...

output:

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

result:

ok 300000 numbers

Test #67:

score: 0
Accepted
time: 19ms
memory: 22724kb

input:

300000 2 300000
300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 300000 3000...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 300000 numbers

Test #68:

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

input:

300000 30 1000
622 137 935 139 329 864 591 710 554 355 102 612 927 472 649 937 39 422 638 282 215 279 1 508 617 625 923 801 376 553 345 27 967 488 3 957 377 487 1000 89 829 149 32 638 61 118 192 202 753 834 519 597 159 375 718 939 124 926 896 238 870 992 856 196 679 317 740 839 830 40 329 332 481 59...

output:

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

result:

ok 300000 numbers

Test #69:

score: 0
Accepted
time: 17ms
memory: 22548kb

input:

300000 300 100
6 73 75 71 12 30 83 100 18 39 44 63 13 51 65 54 12 8 83 29 7 62 56 40 20 12 54 80 42 37 1 34 76 73 91 25 70 97 17 28 35 59 54 1 90 92 38 37 70 27 53 13 60 15 11 56 5 61 98 93 3 48 83 63 90 41 76 10 97 88 51 5 4 90 93 19 91 46 26 92 86 48 26 61 47 84 51 37 30 37 72 48 62 30 84 48 37 13...

output:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

result:

ok 300000 numbers

Test #70:

score: 0
Accepted
time: 46ms
memory: 24356kb

input:

300000 40000 300000
167305 29315 255735 263979 363 67848 119410 197874 2848 130597 82913 222716 74878 141556 180878 295594 246473 124812 246158 155624 81963 110462 33203 290477 237087 43744 168860 62283 182868 5251 18328 81145 17582 43213 287763 151425 55829 110974 280946 281294 297543 241500 96395 ...

output:

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 ...

result:

ok 300000 numbers

Test #71:

score: 0
Accepted
time: 45ms
memory: 26268kb

input:

290000 82000 100000
49262 43920 30112 21205 92378 57944 26366 38375 28528 93361 23006 12799 99850 41742 85767 82254 59763 52509 36059 22230 1291 97845 26128 3636 70317 579 59514 89836 98841 13663 11647 35187 3005 16139 54673 15293 50230 38549 58606 38671 75099 60988 89388 86872 83590 55507 96499 149...

output:

0 1 0 1 0 1 1 0 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 0 1 1 0 0 0 1 0 0 ...

result:

ok 290000 numbers

Extra Test:

score: 0
Extra Test Passed