QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#53701#1428. GrpCrysflyAC ✓74ms5132kbC++113.0kb2022-10-05 20:21:002022-10-05 20:21:01

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-05 20:21:01]
  • 评测
  • 测评结果:AC
  • 用时:74ms
  • 内存:5132kb
  • [2022-10-05 20:21:00]
  • 提交

answer

#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 200005 
#define inf 0x3f3f3f3f

int n,k;
int C[66][66];
mt19937_64 rnd(19890535);

void print(int x){For(i,0,n-1) if(x>>i&1) putchar('a'+i); cout<<" ";}

int bel[maxn],vis[maxn],tim,U[maxn],cnt,V[maxn],len,id[maxn];
void gen(int n,int k,int*U,int&cnt){
	int x=1; cnt=0;
	while(x<(1<<n)){
		while(x<(1<<n) && __builtin_popcount(x)!=k) ++x;
		if(x>=(1<<n)) break;
		U[++cnt]=x; ++x;
	}
}
int get(int u){
	int x=V[rnd()%len+1],v=0,k=0,tmp=0;
	For(i,0,n-1)if(!(u>>i&1)){if(x>>k&1)v|=(1<<i),++tmp;++k;}
	assert(id[v]);
	return id[v];
}
bool dfs(int u){
	vis[u]=tim;
	For(_,1,100){
		int v=get(U[u]);
		if(vis[v]==tim)continue;
		int t=bel[v];
		bel[u]=v,bel[v]=u;
		if(!t||(vis[t]!=tim&&dfs(t)))return 1;
		bel[u]=0,bel[v]=t,bel[t]=v;
	}
	return 0;
}
void wk2(int k)
{
	gen(n,k,U,cnt); assert(cnt==C[n][k]);
	For(i,1,cnt) id[U[i]]=i;
	len=0;
	For(i,1,cnt) if(U[i]<(1<<(n-k))) V[++len]=U[i];
	int res=0;
	while(res<cnt/2){
		++tim;
		For(i,1,cnt)
			if(!bel[i]) res+=dfs(i);
	}
	For(i,1,cnt)
		if(!bel[i]) cout<<1<<" ",print(U[i]),puts("");
		else if(i<bel[i])cout<<2<<" ",print(U[i]),print(U[bel[i]]),puts("");
}

int U1[maxn],U2[maxn],cnt1,cnt2;
int V1[maxn],V2[maxn],len1,len2,hav[maxn];

int Get(int u){
	int x=V2[rnd()%len2+1],v=0,k=0,tmp=0;
	For(i,0,n-1)if(!(u>>i&1)){if(x>>k&1)v|=(1<<i),++tmp;++k;}
	assert(id[v]);
	return id[v];
}
int go(int u)
{
	vis[u]=tim;
	For(_,1,5){
		int v=Get(U1[u]);
		int t=hav[v];
		bel[u]=v,hav[v]=u;
		if(!t||(vis[t]!=tim&&go(t)))return 1;
		bel[u]=0,hav[v]=t,bel[t]=v;
	}
	return 0;
}
void wk1(int k1,int k2)
{
	gen(n,k1,U1,cnt1);
	gen(n,k2,U2,cnt2); len1=len2=0;
	For(i,1,cnt2) id[U2[i]]=i;
	For(i,1,cnt2) if(U2[i]<(1<<(n-k1))) V2[++len2]=U2[i];
//	For(i,1,cnt1) cout<<U1[i]<<" \n"[i==cnt1];
//	For(i,1,cnt2) cout<<U2[i]<<" \n"[i==cnt2];
	For(i,1,cnt1) bel[i]=0;
	For(i,1,cnt2) hav[i]=0;
	int res=0;
	while(res<cnt1){
		++tim;
		For(i,1,cnt1)
			if(!bel[i]) res+=go(i);
//		For(i,1,cnt1) cout<<bel[i]<<" \n"[i==cnt1];
	}
	For(i,1,cnt1) cout<<2<<" ",print(U1[i]),print(U2[bel[i]]),puts("");
	For(i,1,cnt2) if(!hav[i]) cout<<1<<" ",print(U2[i]),puts(""); 
}

signed main()
{
	n=read(),k=read();
	C[0][0]=1;
	For(i,1,n){
		C[i][0]=1;
		For(j,1,i)C[i][j]=C[i-1][j-1]+C[i-1][j];
	}
	int sum=0;
	if(k%2==1){
		For(i,(k+1)/2,k) sum+=C[n][i]; 
	}else{
		For(i,k/2+1,k) sum+=C[n][i];
		sum+=(C[n][k/2]+1)/2;
	}
	cout<<sum<<'\n';
	if(k%2==0)wk2(k/2);
	For(i,0,(k-1)/2) wk1(i,k-i);
	return 0;
}
/*
8 4
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3584kb

input:

3 2

output:

5
2 a c 
1 b 
1 ab 
1 ac 
1 bc 

result:

ok ok, n = 3, k = 2, groups = 5

Test #2:

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

input:

3 3

output:

4
1 abc 
2 a bc 
2 b ac 
2 c ab 

result:

ok ok, n = 3, k = 3, groups = 4

Test #3:

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

input:

1 1

output:

1
1 a 

result:

ok ok, n = 1, k = 1, groups = 1

Test #4:

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

input:

2 1

output:

2
1 a 
1 b 

result:

ok ok, n = 2, k = 1, groups = 2

Test #5:

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

input:

2 2

output:

2
2 a b 
1 ab 

result:

ok ok, n = 2, k = 2, groups = 2

Test #6:

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

input:

3 1

output:

3
1 a 
1 b 
1 c 

result:

ok ok, n = 3, k = 1, groups = 3

Test #7:

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

input:

4 3

output:

10
1 abc 
1 abd 
1 acd 
1 bcd 
2 a bd 
2 b cd 
2 c ad 
2 d ac 
1 ab 
1 bc 

result:

ok ok, n = 4, k = 3, groups = 10

Test #8:

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

input:

4 4

output:

8
2 ab cd 
2 ac bd 
2 bc ad 
1 abcd 
2 a bcd 
2 b acd 
2 c abd 
2 d abc 

result:

ok ok, n = 4, k = 4, groups = 8

Test #9:

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

input:

5 3

output:

20
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
2 a bd 
2 b de 
2 c ad 
2 d be 
2 e bc 
1 ab 
1 ac 
1 cd 
1 ae 
1 ce 

result:

ok ok, n = 5, k = 3, groups = 20

Test #10:

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

input:

5 4

output:

20
2 ab cd 
2 ac be 
2 bc de 
2 ad ce 
2 bd ae 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
2 a bcd 
2 b ade 
2 c bde 
2 d abe 
2 e abd 
1 abc 
1 acd 
1 ace 
1 bce 
1 cde 

result:

ok ok, n = 5, k = 4, groups = 20

Test #11:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

6 4

output:

43
2 ab ce 
2 ac ef 
2 bc ae 
2 ad cf 
2 bd af 
2 cd bf 
2 be df 
1 de 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
1 abcf 
1 abdf 
1 acdf 
1 bcdf 
1 abef 
1 acef 
1 bcef 
1 adef 
1 bdef 
1 cdef 
2 a bce 
2 b cde 
2 c abe 
2 d cef 
2 e abd 
2 f abc 
1 acd 
1 bcd 
1 ace 
1 ade 
1 bde 
1 abf 
1 acf 
1 bcf...

result:

ok ok, n = 6, k = 4, groups = 43

Test #12:

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

input:

10 7

output:

792
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfghi ...

result:

ok ok, n = 10, k = 7, groups = 792

Test #13:

score: 0
Accepted
time: 6ms
memory: 3708kb

input:

13 10

output:

6364
2 abcde ghijl 
2 abcdf giklm 
2 abcef ghikm 
2 abdef gijkm 
2 acdef hjklm 
2 bcdef ghijk 
2 abcdg ehijm 
2 abceg dhilm 
2 abdeg hijlm 
2 acdeg biklm 
2 bcdeg ahjkl 
2 abcfg ehijl 
2 abdfg ehjlm 
2 acdfg behkm 
2 bcdfg aijkm 
2 abefg dhjkl 
2 acefg bijkl 
2 bcefg ahijk 
2 adefg cjklm 
2 bdefg ac...

result:

ok ok, n = 13, k = 10, groups = 6364

Test #14:

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

input:

9 9

output:

256
1 abcdefghi 
2 a bcdefghi 
2 b acdefghi 
2 c abdefghi 
2 d abcefghi 
2 e abcdfghi 
2 f abcdeghi 
2 g abcdefhi 
2 h abcdefgi 
2 i abcdefgh 
2 ab cdefghi 
2 ac bdefghi 
2 bc adefghi 
2 ad bcefghi 
2 bd acefghi 
2 cd abefghi 
2 ae bcdfghi 
2 be acdfghi 
2 ce abdfghi 
2 de abcfghi 
2 af bcdeghi 
2 b...

result:

ok ok, n = 9, k = 9, groups = 256

Test #15:

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

input:

11 8

output:

1584
2 abcd fijk 
2 abce dfhi 
2 abde fgjk 
2 acde bfhj 
2 bcde aghj 
2 abcf ehjk 
2 abdf cegk 
2 acdf ehij 
2 bcdf hijk 
2 abef chik 
2 acef bghk 
2 bcef gijk 
2 adef bghi 
2 bdef agjk 
2 cdef abgj 
2 abcg efjk 
2 abdg chij 
2 acdg bfhk 
2 bcdg aefk 
2 abeg chjk 
2 aceg bhij 
2 bceg dfik 
2 adeg bc...

result:

ok ok, n = 11, k = 8, groups = 1584

Test #16:

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

input:

15 9

output:

25883
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfg...

result:

ok ok, n = 15, k = 9, groups = 25883

Test #17:

score: 0
Accepted
time: 7ms
memory: 3832kb

input:

13 12

output:

4953
2 abcdef ghiklm 
2 abcdeg fijklm 
2 abcdfg ehjklm 
2 abcefg hijklm 
2 abdefg chiklm 
2 acdefg bijklm 
2 bcdefg ahijlm 
2 abcdeh gijklm 
2 abcdfh egijlm 
2 abcefh dgijlm 
2 abdefh cgiklm 
2 acdefh bgiklm 
2 bcdefh agjklm 
2 abcdgh efjklm 
2 abcegh dijklm 
2 abdegh cfijkm 
2 acdegh bfijkm 
2 bcde...

result:

ok ok, n = 13, k = 12, groups = 4953

Test #18:

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

input:

6 2

output:

18
2 a d 
2 b e 
2 c f 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 

result:

ok ok, n = 6, k = 2, groups = 18

Test #19:

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

input:

7 4

output:

81
2 ab dg 
2 ac bf 
2 bc ad 
2 bd cf 
2 cd eg 
2 ae cg 
2 be af 
2 ce bg 
2 de fg 
2 df ag 
1 ef 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
1 abcf 
1 abdf 
1 acdf 
1 bcdf 
1 abef 
1 acef 
1 bcef 
1 adef 
1 bdef 
1 cdef 
1 abcg 
1 abdg 
1 acdg 
1 bcdg 
1 abeg 
1 aceg 
1 bceg 
1 adeg 
1 bdeg 
1 cdeg 
1...

result:

ok ok, n = 7, k = 4, groups = 81

Test #20:

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

input:

12 1

output:

12
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 
1 l 

result:

ok ok, n = 12, k = 1, groups = 12

Test #21:

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

input:

7 2

output:

25
2 a c 
2 b g 
2 d f 
1 e 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 

result:

ok ok, n = 7, k = 2, groups = 25

Test #22:

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

input:

13 9

output:

6721
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfgh...

result:

ok ok, n = 13, k = 9, groups = 6721

Test #23:

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

input:

12 2

output:

72
2 a f 
2 b g 
2 c j 
2 d e 
2 h l 
2 i k 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
1 ej 
1 fj 
1 g...

result:

ok ok, n = 12, k = 2, groups = 72

Test #24:

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

input:

17 14

output:

99416
2 abcdefg ijmnopq 
2 abcdefh jklmnop 
2 abcdegh ijklmoq 
2 abcdfgh eijmnop 
2 abcefgh ijkmnoq 
2 abdefgh klmnopq 
2 acdefgh bimnopq 
2 bcdefgh aiknopq 
2 abcdefi gjklnop 
2 abcdegi fhklmop 
2 abcdfgi ehjmopq 
2 abcefgi dhklmoq 
2 abdefgi chjklpq 
2 acdefgi hjlmnoq 
2 bcdefgi ahjlmnq 
2 abcdehi...

result:

ok ok, n = 17, k = 14, groups = 99416

Test #25:

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

input:

17 5

output:

9248
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh...

result:

ok ok, n = 17, k = 5, groups = 9248

Test #26:

score: 0
Accepted
time: 42ms
memory: 4944kb

input:

17 12

output:

112268
2 abcdef gijkoq 
2 abcdeg hijkmq 
2 abcdfg ejklnq 
2 abcefg dhlmoq 
2 abdefg chlmnq 
2 acdefg bijnoq 
2 bcdefg hknopq 
2 abcdeh fglnpq 
2 abcdfh gjkopq 
2 abcefh dijkmq 
2 abdefh cglmoq 
2 acdefh ijlnop 
2 bcdefh aijknp 
2 abcdgh eijkoq 
2 abcegh dfmnop 
2 abdegh cjkmoq 
2 acdegh bijloq 
2 bc...

result:

ok ok, n = 17, k = 12, groups = 112268

Test #27:

score: 0
Accepted
time: 23ms
memory: 4476kb

input:

17 9

output:

86632
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfg...

result:

ok ok, n = 17, k = 9, groups = 86632

Test #28:

score: 0
Accepted
time: 35ms
memory: 4432kb

input:

17 15

output:

89828
1 abcdefghijklmno 
1 abcdefghijklmnp 
1 abcdefghijklmop 
1 abcdefghijklnop 
1 abcdefghijkmnop 
1 abcdefghijlmnop 
1 abcdefghiklmnop 
1 abcdefghjklmnop 
1 abcdefgijklmnop 
1 abcdefhijklmnop 
1 abcdeghijklmnop 
1 abcdfghijklmnop 
1 abcefghijklmnop 
1 abdefghijklmnop 
1 acdefghijklmnop 
1 bcdefgh...

result:

ok ok, n = 17, k = 15, groups = 89828

Test #29:

score: 0
Accepted
time: 6ms
memory: 4264kb

input:

17 6

output:

21284
2 abc efi 
2 abd egn 
2 acd bhj 
2 bcd fgp 
2 abe ghk 
2 ace gmo 
2 bce gjm 
2 ade ckp 
2 bde kop 
2 cde abf 
2 acf dkp 
2 bcf ekn 
2 adf clo 
2 bdf ejm 
2 cdf bmo 
2 aef dlo 
2 bef gmp 
2 cef adh 
2 def klp 
2 abg cnp 
2 acg fpq 
2 bcg aej 
2 adg fkn 
2 bdg afo 
2 cdg bin 
2 aeg dil 
2 beg jk...

result:

ok ok, n = 17, k = 6, groups = 21284

Test #30:

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

input:

17 2

output:

145
2 a q 
2 b m 
2 c k 
2 d f 
2 e o 
2 g h 
2 i l 
2 j p 
1 n 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1...

result:

ok ok, n = 17, k = 2, groups = 145

Test #31:

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

input:

17 8

output:

63512
2 abcd fjmn 
2 abce dflm 
2 abde fknp 
2 acde hjkq 
2 bcde gkop 
2 abcf dmoq 
2 abdf gijo 
2 acdf bikm 
2 bcdf aenq 
2 abef ghkp 
2 acef bloq 
2 bcef dgkl 
2 adef bglq 
2 bdef amnq 
2 cdef gmnq 
2 abcg ehmn 
2 abdg ijko 
2 acdg fijm 
2 bcdg ahop 
2 abeg ckln 
2 aceg ijkp 
2 bceg fijq 
2 adeg b...

result:

ok ok, n = 17, k = 8, groups = 63512

Test #32:

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

input:

17 13

output:

108460
1 abcdefghijklm 
1 abcdefghijkln 
1 abcdefghijkmn 
1 abcdefghijlmn 
1 abcdefghiklmn 
1 abcdefghjklmn 
1 abcdefgijklmn 
1 abcdefhijklmn 
1 abcdeghijklmn 
1 abcdfghijklmn 
1 abcefghijklmn 
1 abdefghijklmn 
1 acdefghijklmn 
1 bcdefghijklmn 
1 abcdefghijklo 
1 abcdefghijkmo 
1 abcdefghijlmo 
1 ab...

result:

ok ok, n = 17, k = 13, groups = 108460

Test #33:

score: 0
Accepted
time: 37ms
memory: 4632kb

input:

17 17

output:

65536
1 abcdefghijklmnopq 
2 a bcdefghijklmnopq 
2 b acdefghijklmnopq 
2 c abdefghijklmnopq 
2 d abcefghijklmnopq 
2 e abcdfghijklmnopq 
2 f abcdeghijklmnopq 
2 g abcdefhijklmnopq 
2 h abcdefgijklmnopq 
2 i abcdefghjklmnopq 
2 j abcdefghiklmnopq 
2 k abcdefghijlmnopq 
2 l abcdefghijkmnopq 
2 m abcde...

result:

ok ok, n = 17, k = 17, groups = 65536

Test #34:

score: 0
Accepted
time: 33ms
memory: 4488kb

input:

17 10

output:

102986
2 abcde ghlmo 
2 abcdf hilmq 
2 abcef kmnpq 
2 abdef gijoq 
2 acdef bhiop 
2 bcdef jlmnp 
2 abcdg elmno 
2 abceg ijlpq 
2 abdeg hjlno 
2 acdeg bhikq 
2 bcdeg afijq 
2 abcfg dhjkn 
2 abdfg chijq 
2 acdfg ehlop 
2 bcdfg ajlnq 
2 abefg cdkmp 
2 acefg hjlmp 
2 bcefg iklmo 
2 adefg hmopq 
2 bdefg ...

result:

ok ok, n = 17, k = 10, groups = 102986

Test #35:

score: 0
Accepted
time: 7ms
memory: 4484kb

input:

17 7

output:

40392
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfgh...

result:

ok ok, n = 17, k = 7, groups = 40392

Test #36:

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

input:

17 4

output:

3128
2 ab jm 
2 ac gh 
2 bc iq 
2 ad jn 
2 bd gm 
2 cd ej 
2 ae dl 
2 be dg 
2 ce bi 
2 de al 
2 af ho 
2 bf eo 
2 cf no 
2 df ij 
2 ef co 
2 ag dk 
2 bg do 
2 cg bk 
2 eg lm 
2 fg hj 
2 ah gj 
2 bh el 
2 ch bj 
2 dh ao 
2 eh gi 
2 fh gp 
2 ai cj 
2 ci hm 
2 di ep 
2 ei gk 
2 fi jl 
2 hi np 
2 aj dn...

result:

ok ok, n = 17, k = 4, groups = 3128

Test #37:

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

input:

17 16

output:

77690
2 abcdefgh ijklnopq 
2 abcdefgi jklmnopq 
2 abcdefhi gjklmnop 
2 abcdeghi fjklmnoq 
2 abcdfghi ejklmnop 
2 abcefghi djkmnopq 
2 abdefghi cklmnopq 
2 acdefghi bjklmnpq 
2 bcdefghi ajklmnop 
2 abcdefgj hiklmopq 
2 abcdefhj gklmnopq 
2 abcdeghj fiklmopq 
2 abcdfghj eiklmopq 
2 abcefghj diklmnop 
...

result:

ok ok, n = 17, k = 16, groups = 77690

Test #38:

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

input:

17 11

output:

112268
1 abcdefghijk 
1 abcdefghijl 
1 abcdefghikl 
1 abcdefghjkl 
1 abcdefgijkl 
1 abcdefhijkl 
1 abcdeghijkl 
1 abcdfghijkl 
1 abcefghijkl 
1 abdefghijkl 
1 acdefghijkl 
1 bcdefghijkl 
1 abcdefghijm 
1 abcdefghikm 
1 abcdefghjkm 
1 abcdefgijkm 
1 abcdefhijkm 
1 abcdeghijkm 
1 abcdfghijkm 
1 abcefg...

result:

ok ok, n = 17, k = 11, groups = 112268

Test #39:

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

input:

17 3

output:

816
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 17, k = 3, groups = 816

Test #40:

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

input:

17 1

output:

17
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 
1 l 
1 m 
1 n 
1 o 
1 p 
1 q 

result:

ok ok, n = 17, k = 1, groups = 17

Test #41:

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

input:

16 15

output:

39202
1 abcdefghijklmno 
1 abcdefghijklmnp 
1 abcdefghijklmop 
1 abcdefghijklnop 
1 abcdefghijkmnop 
1 abcdefghijlmnop 
1 abcdefghiklmnop 
1 abcdefghjklmnop 
1 abcdefgijklmnop 
1 abcdefhijklmnop 
1 abcdeghijklmnop 
1 abcdfghijklmnop 
1 abcefghijklmnop 
1 abdefghijklmnop 
1 acdefghijklmnop 
1 bcdefgh...

result:

ok ok, n = 16, k = 15, groups = 39202

Test #42:

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

input:

16 11

output:

56134
1 abcdefghijk 
1 abcdefghijl 
1 abcdefghikl 
1 abcdefghjkl 
1 abcdefgijkl 
1 abcdefhijkl 
1 abcdeghijkl 
1 abcdfghijkl 
1 abcefghijkl 
1 abdefghijkl 
1 acdefghijkl 
1 bcdefghijkl 
1 abcdefghijm 
1 abcdefghikm 
1 abcdefghjkm 
1 abcdefgijkm 
1 abcdefhijkm 
1 abcdeghijkm 
1 abcdfghijkm 
1 abcefgh...

result:

ok ok, n = 16, k = 11, groups = 56134

Test #43:

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

input:

16 5

output:

6748
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh...

result:

ok ok, n = 16, k = 5, groups = 6748

Test #44:

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

input:

16 8

output:

37596
2 abcd ghop 
2 abce himp 
2 abde himn 
2 acde bjlp 
2 bcde ghjn 
2 abcf jklm 
2 abdf ehio 
2 acdf hikn 
2 bcdf aego 
2 abef hilm 
2 acef bhop 
2 bcef imop 
2 adef hjop 
2 bdef aclm 
2 cdef bkop 
2 abcg ijlo 
2 abdg ijko 
2 acdg bklo 
2 bcdg aehm 
2 abeg film 
2 aceg djkn 
2 bceg dfin 
2 adeg c...

result:

ok ok, n = 16, k = 8, groups = 37596

Test #45:

score: 0
Accepted
time: 7ms
memory: 4016kb

input:

16 6

output:

14476
2 abc fkn 
2 abd hjk 
2 acd gik 
2 bcd agn 
2 abe fgh 
2 ace bin 
2 bce mno 
2 ade mnp 
2 bde fmp 
2 cde hjn 
2 abf gmo 
2 acf hno 
2 bcf hko 
2 adf blp 
2 bdf kno 
2 cdf ako 
2 aef dgh 
2 bef acm 
2 cef adn 
2 def chl 
2 abg dij 
2 acg dlp 
2 bcg emo 
2 adg eim 
2 bdg ail 
2 cdg amn 
2 aeg bf...

result:

ok ok, n = 16, k = 6, groups = 14476

Test #46:

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

input:

16 1

output:

16
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 
1 l 
1 m 
1 n 
1 o 
1 p 

result:

ok ok, n = 16, k = 1, groups = 16

Test #47:

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

input:

16 9

output:

48126
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfg...

result:

ok ok, n = 16, k = 9, groups = 48126

Test #48:

score: 0
Accepted
time: 18ms
memory: 4316kb

input:

16 12

output:

53950
2 abcdef iklmnp 
2 abcdeg hjklmo 
2 abcdfg ehijln 
2 abcefg djknop 
2 abdefg cijlno 
2 acdefg bhikmn 
2 bcdefg ahjlmo 
2 abcdeh fjlnop 
2 abcdfh egijln 
2 abcefh jlmnop 
2 abdefh cijmno 
2 acdefh bgilmp 
2 bcdefh gjlnop 
2 abcdgh ekmnop 
2 abcegh fikmop 
2 abdegh fjmnop 
2 acdegh bfijkp 
2 bcd...

result:

ok ok, n = 16, k = 12, groups = 53950

Test #49:

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

input:

16 10

output:

53950
2 abcde fimop 
2 abcdf hjlmn 
2 abcef gjnop 
2 abdef ghkmo 
2 acdef bhilo 
2 bcdef ijkno 
2 abcdg ehmop 
2 abceg fhiko 
2 abdeg cflmn 
2 acdeg bfiln 
2 bcdeg afklp 
2 abcfg ehimn 
2 abdfg ehnop 
2 acdfg ehijo 
2 bcdfg eklno 
2 abefg cdino 
2 acefg bknop 
2 bcefg hjlmo 
2 adefg bchmp 
2 bdefg c...

result:

ok ok, n = 16, k = 10, groups = 53950

Test #50:

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

input:

16 4

output:

2440
2 ab fk 
2 ac gi 
2 bc ij 
2 ad ek 
2 bd kp 
2 cd mo 
2 ae fj 
2 be ck 
2 ce ak 
2 de ln 
2 af hn 
2 bf cj 
2 cf no 
2 df il 
2 ef hp 
2 ag bi 
2 bg ik 
2 cg eh 
2 dg np 
2 eg ai 
2 fg ko 
2 ah co 
2 bh dj 
2 ch do 
2 dh aj 
2 fh en 
2 gh im 
2 ci gn 
2 di kn 
2 ei al 
2 fi ap 
2 hi jp 
2 bj dm...

result:

ok ok, n = 16, k = 4, groups = 2440

Test #51:

score: 0
Accepted
time: 15ms
memory: 4064kb

input:

16 16

output:

32768
2 abcdefgh ijklmnop 
2 abcdefgi hjklmnop 
2 abcdefhi gjklmnop 
2 abcdeghi fjklmnop 
2 abcdfghi ejklmnop 
2 abcefghi djklmnop 
2 abdefghi cjklmnop 
2 acdefghi bjklmnop 
2 bcdefghi ajklmnop 
2 abcdefgj hiklmnop 
2 abcdefhj giklmnop 
2 abcdeghj fiklmnop 
2 abcdfghj eiklmnop 
2 abcefghj diklmnop 
...

result:

ok ok, n = 16, k = 16, groups = 32768

Test #52:

score: 0
Accepted
time: 41ms
memory: 4792kb

input:

16 14

output:

44906
2 abcdefg hijknop 
2 abcdefh gijklmp 
2 abcdegh ijlmnop 
2 abcdfgh eijlnop 
2 abcefgh djkmnop 
2 abdefgh cijlmnp 
2 acdefgh bijklmp 
2 bcdefgh aijlnop 
2 abcdefi gjlmnop 
2 abcdegi hjkmnop 
2 abcdfgi ejklmnp 
2 abcefgi djklmnp 
2 abdefgi chklmop 
2 acdefgi bhklmnp 
2 bcdefgi ajklmno 
2 abcdehi...

result:

ok ok, n = 16, k = 14, groups = 44906

Test #53:

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

input:

16 7

output:

25636
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfgh...

result:

ok ok, n = 16, k = 7, groups = 25636

Test #54:

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

input:

16 3

output:

680
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 16, k = 3, groups = 680

Test #55:

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

input:

16 2

output:

128
2 a i 
2 b j 
2 c l 
2 d f 
2 e h 
2 g m 
2 k n 
2 o p 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
...

result:

ok ok, n = 16, k = 2, groups = 128

Test #56:

score: 0
Accepted
time: 18ms
memory: 4056kb

input:

16 13

output:

50506
1 abcdefghijklm 
1 abcdefghijkln 
1 abcdefghijkmn 
1 abcdefghijlmn 
1 abcdefghiklmn 
1 abcdefghjklmn 
1 abcdefgijklmn 
1 abcdefhijklmn 
1 abcdeghijklmn 
1 abcdfghijklmn 
1 abcefghijklmn 
1 abdefghijklmn 
1 acdefghijklmn 
1 bcdefghijklmn 
1 abcdefghijklo 
1 abcdefghijkmo 
1 abcdefghijlmo 
1 abc...

result:

ok ok, n = 16, k = 13, groups = 50506

Test #57:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

15 1

output:

15
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 
1 l 
1 m 
1 n 
1 o 

result:

ok ok, n = 15, k = 1, groups = 15

Test #58:

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

input:

15 14

output:

19601
2 abcdefg hiklmno 
2 abcdefh gjklmno 
2 abcdegh fijklno 
2 abcdfgh ijklmno 
2 abcefgh djklmno 
2 abdefgh cjklmno 
2 acdefgh bjklmno 
2 bcdefgh aiklmno 
2 abcdefi ghjkmno 
2 abcdegi fhjklmo 
2 abcdfgi ejklmno 
2 abcefgi dhjklmo 
2 abdefgi chjklmn 
2 acdefgi bhjklmo 
2 bcdefgi hjklmno 
2 abcdehi...

result:

ok ok, n = 15, k = 14, groups = 19601

Test #59:

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

input:

15 6

output:

9601
2 abc iko 
2 abd fkn 
2 acd bkl 
2 bcd hjl 
2 abe hlo 
2 ace fik 
2 bce gjk 
2 ade bgm 
2 bde hjm 
2 cde hil 
2 abf gno 
2 acf bgl 
2 bcf alo 
2 adf bhk 
2 bdf gim 
2 cdf gjo 
2 aef gjn 
2 bef cin 
2 cef hmo 
2 def cln 
2 abg lno 
2 acg bfj 
2 bcg deh 
2 adg fmo 
2 bdg cjo 
2 cdg kln 
2 aeg klm...

result:

ok ok, n = 15, k = 6, groups = 9601

Test #60:

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

input:

15 2

output:

113
2 a e 
2 b g 
2 c o 
2 d f 
2 h i 
2 j n 
2 k m 
1 l 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
1 ...

result:

ok ok, n = 15, k = 2, groups = 113

Test #61:

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

input:

15 8

output:

21561
2 abcd egil 
2 abce dgjo 
2 abde fhko 
2 acde bgkl 
2 bcde giln 
2 abcf ehlm 
2 abdf cgmn 
2 acdf ehjm 
2 bcdf eikm 
2 abef dgmo 
2 acef ikno 
2 bcef dlmo 
2 adef bgjo 
2 bdef ghjk 
2 cdef bgkn 
2 abcg jlmn 
2 abdg klmo 
2 acdg efhk 
2 bcdg aeno 
2 abeg fijk 
2 aceg dijn 
2 bceg jkmo 
2 adeg b...

result:

ok ok, n = 15, k = 8, groups = 21561

Test #62:

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

input:

15 5

output:

4823
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh...

result:

ok ok, n = 15, k = 5, groups = 4823

Test #63:

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

input:

15 3

output:

560
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 15, k = 3, groups = 560

Test #64:

score: 0
Accepted
time: 7ms
memory: 3944kb

input:

15 7

output:

15808
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfgh...

result:

ok ok, n = 15, k = 7, groups = 15808

Test #65:

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

input:

15 10

output:

27385
2 abcde gijkn 
2 abcdf ehimo 
2 abcef dhmno 
2 abdef chikl 
2 acdef bhikl 
2 bcdef ajlmo 
2 abcdg fikmn 
2 abceg hjkno 
2 abdeg hklmo 
2 acdeg bijko 
2 bcdeg afmno 
2 abcfg dhimn 
2 abdfg ceklm 
2 acdfg behil 
2 bcdfg ajkno 
2 abefg cdijm 
2 acefg bhjlo 
2 bcefg aklno 
2 adefg hjkmo 
2 bdefg a...

result:

ok ok, n = 15, k = 10, groups = 27385

Test #66:

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

input:

15 11

output:

27248
1 abcdefghijk 
1 abcdefghijl 
1 abcdefghikl 
1 abcdefghjkl 
1 abcdefgijkl 
1 abcdefhijkl 
1 abcdeghijkl 
1 abcdfghijkl 
1 abcefghijkl 
1 abdefghijkl 
1 acdefghijkl 
1 bcdefghijkl 
1 abcdefghijm 
1 abcdefghikm 
1 abcdefghjkm 
1 abcdefgijkm 
1 abcdefhijkm 
1 abcdeghijkm 
1 abcdfghijkm 
1 abcefgh...

result:

ok ok, n = 15, k = 11, groups = 27248

Test #67:

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

input:

15 4

output:

1873
2 ab fk 
2 ac ho 
2 bc ae 
2 ad mo 
2 bd jm 
2 cd eg 
2 be cl 
2 ce bh 
2 de bk 
2 af co 
2 bf im 
2 cf ik 
2 df jk 
2 ef ln 
2 ag ck 
2 bg eo 
2 cg do 
2 dg el 
2 fg cm 
2 ah ej 
2 ch ij 
2 dh lm 
2 eh aj 
2 fh io 
2 gh ko 
2 ai hm 
2 bi kn 
2 ci jo 
2 di kl 
2 ei gm 
2 fi al 
2 gi dl 
2 hi dn...

result:

ok ok, n = 15, k = 4, groups = 1873

Test #68:

score: 0
Accepted
time: 6ms
memory: 3820kb

input:

15 13

output:

22803
1 abcdefghijklm 
1 abcdefghijkln 
1 abcdefghijkmn 
1 abcdefghijlmn 
1 abcdefghiklmn 
1 abcdefghjklmn 
1 abcdefgijklmn 
1 abcdefhijklmn 
1 abcdeghijklmn 
1 abcdfghijklmn 
1 abcefghijklmn 
1 abdefghijklmn 
1 acdefghijklmn 
1 bcdefghijklmn 
1 abcdefghijklo 
1 abcdefghijkmo 
1 abcdefghijlmo 
1 abc...

result:

ok ok, n = 15, k = 13, groups = 22803

Test #69:

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

input:

15 12

output:

25201
2 abcdef hjklno 
2 abcdeg fhijno 
2 abcdfg jklmno 
2 abcefg dhikln 
2 abdefg chjkln 
2 acdefg bijkno 
2 bcdefg aijkno 
2 abcdeh fgikno 
2 abcdfh ejklmo 
2 abcefh dgklno 
2 abdefh cgijlo 
2 acdefh giklno 
2 bcdefh agilmn 
2 abcdgh ejklmn 
2 abcegh fijklo 
2 abdegh ijlmno 
2 acdegh bfilno 
2 bcd...

result:

ok ok, n = 15, k = 12, groups = 25201

Test #70:

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

input:

15 15

output:

16384
1 abcdefghijklmno 
2 a bcdefghijklmno 
2 b acdefghijklmno 
2 c abdefghijklmno 
2 d abcefghijklmno 
2 e abcdfghijklmno 
2 f abcdeghijklmno 
2 g abcdefhijklmno 
2 h abcdefgijklmno 
2 i abcdefghjklmno 
2 j abcdefghiklmno 
2 k abcdefghijlmno 
2 l abcdefghijkmno 
2 m abcdefghijklno 
2 n abcdefghijk...

result:

ok ok, n = 15, k = 15, groups = 16384

Test #71:

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

input:

14 3

output:

455
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 14, k = 3, groups = 455

Test #72:

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

input:

14 10

output:

13442
2 abcde fgjkl 
2 abcdf ghikm 
2 abcef ghjmn 
2 abdef ghilm 
2 acdef bhimn 
2 bcdef ahjlm 
2 abcdg hijmn 
2 abceg dijln 
2 abdeg fhjkm 
2 acdeg bfhin 
2 bcdeg ahijm 
2 abcfg ejkln 
2 abdfg cehjk 
2 acdfg bhijn 
2 bcdfg ijlmn 
2 abefg cdjln 
2 acefg jklmn 
2 bcefg ahimn 
2 adefg chiln 
2 bdefg a...

result:

ok ok, n = 14, k = 10, groups = 13442

Test #73:

score: 0
Accepted
time: 6ms
memory: 3764kb

input:

14 9

output:

13442
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfg...

result:

ok ok, n = 14, k = 9, groups = 13442

Test #74:

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

input:

14 4

output:

1411
2 ab dl 
2 ac dh 
2 bc an 
2 ad ci 
2 bd jm 
2 cd gh 
2 ae jl 
2 be ch 
2 ce gn 
2 de bg 
2 af ij 
2 bf hl 
2 cf km 
2 df el 
2 ef hm 
2 ag im 
2 cg hi 
2 dg hk 
2 eg jk 
2 fg dm 
2 ah lm 
2 bh ln 
2 eh fi 
2 fh al 
2 ai fk 
2 bi mn 
2 di fm 
2 ei gk 
2 gi cl 
2 aj bl 
2 bj fl 
2 cj in 
2 dj gm...

result:

ok ok, n = 14, k = 4, groups = 1411

Test #75:

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

input:

14 7

output:

9438
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfghi...

result:

ok ok, n = 14, k = 7, groups = 9438

Test #76:

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

input:

14 11

output:

12805
1 abcdefghijk 
1 abcdefghijl 
1 abcdefghikl 
1 abcdefghjkl 
1 abcdefgijkl 
1 abcdefhijkl 
1 abcdeghijkl 
1 abcdfghijkl 
1 abcefghijkl 
1 abdefghijkl 
1 acdefghijkl 
1 bcdefghijkl 
1 abcdefghijm 
1 abcdefghikm 
1 abcdefghjkm 
1 abcdefgijkm 
1 abcdefhijkm 
1 abcdeghijkm 
1 abcdfghijkm 
1 abcefgh...

result:

ok ok, n = 14, k = 11, groups = 12805

Test #77:

score: 0
Accepted
time: 6ms
memory: 3708kb

input:

14 14

output:

8192
2 abcdefg hijklmn 
2 abcdefh gijklmn 
2 abcdegh fijklmn 
2 abcdfgh eijklmn 
2 abcefgh dijklmn 
2 abdefgh cijklmn 
2 acdefgh bijklmn 
2 bcdefgh aijklmn 
2 abcdefi ghjklmn 
2 abcdegi fhjklmn 
2 abcdfgi ehjklmn 
2 abcefgi dhjklmn 
2 abdefgi chjklmn 
2 acdefgi bhjklmn 
2 bcdefgi ahjklmn 
2 abcdehi ...

result:

ok ok, n = 14, k = 14, groups = 8192

Test #78:

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

input:

14 6

output:

6188
2 abc fkl 
2 abd cgk 
2 acd gim 
2 bcd gmn 
2 abe chi 
2 ace glm 
2 bce dfl 
2 ade bcl 
2 bde jlm 
2 cde abf 
2 acf bhk 
2 bcf dkn 
2 adf kln 
2 bdf agm 
2 cdf ilm 
2 aef gkm 
2 bef dil 
2 cef dhl 
2 def imn 
2 abg djk 
2 acg bhj 
2 bcg adi 
2 adg eim 
2 bdg fij 
2 cdg ijn 
2 aeg bil 
2 beg hjk...

result:

ok ok, n = 14, k = 6, groups = 6188

Test #79:

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

input:

14 5

output:

3367
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh...

result:

ok ok, n = 14, k = 5, groups = 3367

Test #80:

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

input:

14 13

output:

9907
1 abcdefghijklm 
1 abcdefghijkln 
1 abcdefghijkmn 
1 abcdefghijlmn 
1 abcdefghiklmn 
1 abcdefghjklmn 
1 abcdefgijklmn 
1 abcdefhijklmn 
1 abcdeghijklmn 
1 abcdfghijklmn 
1 abcefghijklmn 
1 abdefghijklmn 
1 acdefghijklmn 
1 bcdefghijklmn 
2 a bcdefghjklmn 
2 b acdefgijklmn 
2 c abdefghijkln 
2 d...

result:

ok ok, n = 14, k = 13, groups = 9907

Test #81:

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

input:

14 1

output:

14
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 
1 l 
1 m 
1 n 

result:

ok ok, n = 14, k = 1, groups = 14

Test #82:

score: 0
Accepted
time: 11ms
memory: 3848kb

input:

14 12

output:

11395
2 abcdef gjklmn 
2 abcdeg hijkln 
2 abcdfg ijklmn 
2 abcefg dhijmn 
2 abdefg hijkmn 
2 acdefg hijlmn 
2 bcdefg ajklmn 
2 abcdeh fiklmn 
2 abcdfh egilmn 
2 abcefh dgijkm 
2 abdefh cgijmn 
2 acdefh giklmn 
2 bcdefh aiklmn 
2 abcdgh fijklm 
2 abcegh dfjklm 
2 abdegh fijkmn 
2 acdegh bfikmn 
2 bcd...

result:

ok ok, n = 14, k = 12, groups = 11395

Test #83:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

14 2

output:

98
2 a g 
2 b h 
2 c m 
2 d j 
2 e n 
2 f k 
2 i l 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
1 ej 
1 ...

result:

ok ok, n = 14, k = 2, groups = 98

Test #84:

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

input:

14 8

output:

11941
2 abcd fjkn 
2 abce gjln 
2 abde fikm 
2 acde fgik 
2 bcde gikn 
2 abcf ejkm 
2 abdf eikm 
2 acdf eijn 
2 bcdf ghln 
2 abef jklm 
2 acef ilmn 
2 bcef ahjm 
2 adef bchm 
2 bdef aclm 
2 cdef himn 
2 abcg dklm 
2 abdg hjkl 
2 acdg ijlm 
2 bcdg aklm 
2 abeg cfkl 
2 aceg dfhm 
2 bceg adfn 
2 adeg h...

result:

ok ok, n = 14, k = 8, groups = 11941

Test #85:

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

input:

13 7

output:

5434
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfghi...

result:

ok ok, n = 13, k = 7, groups = 5434

Test #86:

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

input:

13 8

output:

6364
2 abcd ghik 
2 abce dghm 
2 abde gijl 
2 acde gijm 
2 bcde fgik 
2 abcf dgik 
2 abdf ejkm 
2 acdf bejk 
2 bcdf aehm 
2 abef cghi 
2 acef dgkl 
2 bcef gilm 
2 adef bgjm 
2 bdef acgl 
2 cdef agjk 
2 abcg hikm 
2 abdg chkl 
2 acdg eikm 
2 bcdg ahim 
2 abeg cdhj 
2 aceg fhil 
2 bceg ahkl 
2 adeg cf...

result:

ok ok, n = 13, k = 8, groups = 6364

Test #87:

score: 0
Accepted
time: 1ms
memory: 3720kb

input:

13 13

output:

4096
1 abcdefghijklm 
2 a bcdefghijklm 
2 b acdefghijklm 
2 c abdefghijklm 
2 d abcefghijklm 
2 e abcdfghijklm 
2 f abcdeghijklm 
2 g abcdefhijklm 
2 h abcdefgijklm 
2 i abcdefghjklm 
2 j abcdefghiklm 
2 k abcdefghijlm 
2 l abcdefghijkm 
2 m abcdefghijkl 
2 ab cdefghijklm 
2 ac bdefghijklm 
2 bc ade...

result:

ok ok, n = 13, k = 13, groups = 4096

Test #88:

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

input:

13 4

output:

1040
2 ab dl 
2 ac hk 
2 bc dj 
2 ad ef 
2 bd gi 
2 cd af 
2 ae gk 
2 be fm 
2 ce im 
2 de bi 
2 bf ai 
2 cf hl 
2 df il 
2 ag di 
2 bg ak 
2 cg fl 
2 dg cl 
2 eg km 
2 fg kl 
2 ah ej 
2 bh el 
2 ch lm 
2 dh ek 
2 eh jm 
2 fh al 
2 gh jl 
2 ci hm 
2 ei hj 
2 fi gl 
2 hi gm 
2 aj bl 
2 bj ck 
2 cj ik...

result:

ok ok, n = 13, k = 4, groups = 1040

Test #89:

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

input:

13 1

output:

13
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 
1 l 
1 m 

result:

ok ok, n = 13, k = 1, groups = 13

Test #90:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

13 5

output:

2288
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh...

result:

ok ok, n = 13, k = 5, groups = 2288

Test #91:

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

input:

13 3

output:

364
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 13, k = 3, groups = 364

Test #92:

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

input:

13 6

output:

3861
2 abc dek 
2 abd cgh 
2 acd gim 
2 bcd ejm 
2 abe hij 
2 ace hkl 
2 bce djk 
2 ade gjk 
2 bde agj 
2 cde fgl 
2 abf ghl 
2 acf bim 
2 bcf egk 
2 adf chi 
2 bdf ilm 
2 cdf agk 
2 aef gil 
2 bef aik 
2 cef him 
2 def bhl 
2 abg dhl 
2 acg dfk 
2 bcg ael 
2 adg bel 
2 bdg ckl 
2 cdg ahi 
2 aeg bdk...

result:

ok ok, n = 13, k = 6, groups = 3861

Test #93:

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

input:

13 2

output:

85
2 a i 
2 b m 
2 c f 
2 d l 
2 e j 
2 g k 
1 h 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
1 ej 
1 fj...

result:

ok ok, n = 13, k = 2, groups = 85

Test #94:

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

input:

13 11

output:

5798
1 abcdefghijk 
1 abcdefghijl 
1 abcdefghikl 
1 abcdefghjkl 
1 abcdefgijkl 
1 abcdefhijkl 
1 abcdeghijkl 
1 abcdfghijkl 
1 abcefghijkl 
1 abdefghijkl 
1 acdefghijkl 
1 bcdefghijkl 
1 abcdefghijm 
1 abcdefghikm 
1 abcdefghjkm 
1 abcdefgijkm 
1 abcdefhijkm 
1 abcdeghijkm 
1 abcdfghijkm 
1 abcefghi...

result:

ok ok, n = 13, k = 11, groups = 5798

Test #95:

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

input:

12 10

output:

2893
2 abcde fgijk 
2 abcdf ehijk 
2 abcef dghkl 
2 abdef chijk 
2 acdef bghil 
2 bcdef aghij 
2 abcdg efhij 
2 abceg dfhjk 
2 abdeg chijl 
2 acdeg fhijl 
2 bcdeg afhjl 
2 abcfg ehikl 
2 abdfg cehjl 
2 acdfg hijkl 
2 bcdfg ahijk 
2 abefg dhjkl 
2 acefg bhikl 
2 bcefg dhijl 
2 adefg bchjk 
2 bdefg ac...

result:

ok ok, n = 12, k = 10, groups = 2893

Test #96:

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

input:

12 11

output:

2509
1 abcdefghijk 
1 abcdefghijl 
1 abcdefghikl 
1 abcdefghjkl 
1 abcdefgijkl 
1 abcdefhijkl 
1 abcdeghijkl 
1 abcdfghijkl 
1 abcefghijkl 
1 abdefghijkl 
1 acdefghijkl 
1 bcdefghijkl 
2 a bcdefgijkl 
2 b acdefghijk 
2 c abdefghijk 
2 d abcefhijkl 
2 e abdfghijkl 
2 f abcdeghjkl 
2 g bcdefhijkl 
2 h...

result:

ok ok, n = 12, k = 11, groups = 2509

Test #97:

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

input:

12 6

output:

2321
2 abc dej 
2 abd cjk 
2 acd gkl 
2 bcd afi 
2 abe dij 
2 ace dhl 
2 bce gik 
2 ade bck 
2 bde hil 
2 cde abj 
2 abf dhj 
2 acf jkl 
2 bcf ghk 
2 adf bch 
2 bdf ahk 
2 cdf ehl 
2 aef bik 
2 bef dgj 
2 cef aij 
2 def aci 
2 abg efi 
2 acg hjk 
2 bcg ajl 
2 adg cfl 
2 bdg cfj 
2 cdg ail 
2 aeg bil...

result:

ok ok, n = 12, k = 6, groups = 2321

Test #98:

score: 0
Accepted
time: 1ms
memory: 3684kb

input:

12 7

output:

3003
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfghi...

result:

ok ok, n = 12, k = 7, groups = 3003

Test #99:

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

input:

12 12

output:

2048
2 abcdef ghijkl 
2 abcdeg fhijkl 
2 abcdfg ehijkl 
2 abcefg dhijkl 
2 abdefg chijkl 
2 acdefg bhijkl 
2 bcdefg ahijkl 
2 abcdeh fgijkl 
2 abcdfh egijkl 
2 abcefh dgijkl 
2 abdefh cgijkl 
2 acdefh bgijkl 
2 bcdefh agijkl 
2 abcdgh efijkl 
2 abcegh dfijkl 
2 abdegh cfijkl 
2 acdegh bfijkl 
2 bcde...

result:

ok ok, n = 12, k = 12, groups = 2048

Test #100:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

12 5

output:

1507
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh...

result:

ok ok, n = 12, k = 5, groups = 1507

Test #101:

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

input:

12 8

output:

3251
2 abcd egjl 
2 abce dfil 
2 abde chik 
2 acde fhjl 
2 bcde ahjk 
2 abcf egjk 
2 abdf eijk 
2 acdf ghkl 
2 bcdf aijl 
2 abef ghil 
2 acef dhjl 
2 bcef dghi 
2 adef hijk 
2 bdef acik 
2 cdef gijl 
2 abcg efkl 
2 abdg efhi 
2 acdg eikl 
2 bcdg aejl 
2 abeg cdjk 
2 aceg bikl 
2 bceg dhik 
2 adeg fi...

result:

ok ok, n = 12, k = 8, groups = 3251

Test #102:

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

input:

12 4

output:

748
2 ab cf 
2 ac eg 
2 bc dj 
2 ad bi 
2 bd hl 
2 cd ej 
2 ae dl 
2 be ik 
2 ce fj 
2 de aj 
2 af di 
2 bf ai 
2 df jk 
2 ef gj 
2 ag ch 
2 bg cj 
2 cg ei 
2 dg bj 
2 fg ij 
2 ah kl 
2 bh fi 
2 dh gl 
2 eh il 
2 fh ck 
2 gh ek 
2 ci hj 
2 gi dk 
2 hi fl 
2 ak bl 
2 bk jl 
2 fk al 
2 gk el 
2 hk cl ...

result:

ok ok, n = 12, k = 4, groups = 748

Test #103:

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

input:

12 3

output:

286
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 12, k = 3, groups = 286

Test #104:

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

input:

12 9

output:

3223
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfgh...

result:

ok ok, n = 12, k = 9, groups = 3223

Test #105:

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

input:

11 9

output:

1474
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
1 abcdefghk 
1 abcdefgik 
1 abcdefhik 
1 abcdeghik 
1 abcdfghik 
1 abcefghik 
1 abdefghik 
1 acdefghik 
1 bcdefghik 
1 abcdefgjk 
1 abcdefhjk 
1 abcdeghjk 
1 abcdfgh...

result:

ok ok, n = 11, k = 9, groups = 1474

Test #106:

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

input:

11 11

output:

1024
1 abcdefghijk 
2 a bcdefghijk 
2 b acdefghijk 
2 c abdefghijk 
2 d abcefghijk 
2 e abcdfghijk 
2 f abcdeghijk 
2 g abcdefhijk 
2 h abcdefgijk 
2 i abcdefghjk 
2 j abcdefghik 
2 k abcdefghij 
2 ab cdefghijk 
2 ac bdefghijk 
2 bc adefghijk 
2 ad bcefghijk 
2 bd acefghijk 
2 cd abefghijk 
2 ae bcd...

result:

ok ok, n = 11, k = 11, groups = 1024

Test #107:

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

input:

11 1

output:

11
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 
1 k 

result:

ok ok, n = 11, k = 1, groups = 11

Test #108:

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

input:

11 4

output:

523
2 ab gi 
2 ac jk 
2 bc gj 
2 ad ci 
2 bd cj 
2 cd gk 
2 ae fh 
2 be ck 
2 ce aj 
2 de ik 
2 af di 
2 bf eg 
2 cf gh 
2 df hk 
2 ef dg 
2 ag bj 
2 bg dh 
2 cg bk 
2 fg dj 
2 ah ek 
2 bh ai 
2 ch dk 
2 eh fk 
2 bi ak 
2 ei hj 
2 fi ej 
2 hi fj 
1 ij 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
1 abcf ...

result:

ok ok, n = 11, k = 4, groups = 523

Test #109:

score: 0
Accepted
time: 1ms
memory: 3716kb

input:

11 6

output:

1337
2 abc ijk 
2 abd cfh 
2 acd fhk 
2 bcd fgi 
2 abe cjk 
2 ace fhj 
2 bce hik 
2 ade bfj 
2 bde cfg 
2 cde bhk 
2 abf dgi 
2 acf bej 
2 bcf ghj 
2 adf bcg 
2 bdf ghi 
2 cdf bhi 
2 aef bgh 
2 bef agk 
2 cef agj 
2 def ahk 
2 abg dfi 
2 acg dei 
2 adg beh 
2 bdg aci 
2 cdg ejk 
2 aeg dij 
2 beg hij...

result:

ok ok, n = 11, k = 6, groups = 1337

Test #110:

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

input:

11 10

output:

1254
2 abcde fgijk 
2 abcdf egijk 
2 abcef dghjk 
2 abdef ghijk 
2 acdef bhijk 
2 bcdef aghij 
2 abcdg efhik 
2 abceg dfijk 
2 abdeg cfijk 
2 acdeg fhijk 
2 bcdeg afhik 
2 abcfg dehik 
2 abdfg ceijk 
2 acdfg behij 
2 bcdfg ehijk 
2 abefg chijk 
2 acefg dhijk 
2 bcefg adijk 
2 adefg bchik 
2 bdefg ac...

result:

ok ok, n = 11, k = 10, groups = 1254

Test #111:

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

input:

11 7

output:

1584
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfghi...

result:

ok ok, n = 11, k = 7, groups = 1584

Test #112:

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

input:

11 2

output:

61
2 a i 
2 b e 
2 c f 
2 d j 
2 g k 
1 h 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
1 ej 
1 fj 
1 gj ...

result:

ok ok, n = 11, k = 2, groups = 61

Test #113:

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

input:

11 5

output:

957
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh ...

result:

ok ok, n = 11, k = 5, groups = 957

Test #114:

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

input:

11 3

output:

220
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 11, k = 3, groups = 220

Test #115:

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

input:

10 8

output:

732
2 abcd fghj 
2 abce dfhi 
2 abde cfhj 
2 acde fghi 
2 bcde aghi 
2 abcf degh 
2 abdf cgij 
2 acdf egij 
2 bcdf aegh 
2 abef cghi 
2 acef bghj 
2 bcef ghij 
2 adef bcij 
2 bdef acgh 
2 cdef ahij 
2 abcg dfij 
2 abdg ceij 
2 acdg bfij 
2 bcdg efhi 
2 abeg fhij 
2 aceg bdhj 
2 bceg dhij 
2 adeg bcf...

result:

ok ok, n = 10, k = 8, groups = 732

Test #116:

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

input:

10 1

output:

10
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 
1 j 

result:

ok ok, n = 10, k = 1, groups = 10

Test #117:

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

input:

10 9

output:

637
1 abcdefghi 
1 abcdefghj 
1 abcdefgij 
1 abcdefhij 
1 abcdeghij 
1 abcdfghij 
1 abcefghij 
1 abdefghij 
1 acdefghij 
1 bcdefghij 
2 a bcdefghj 
2 b cdefghij 
2 c adefghij 
2 d acefghij 
2 e abcdghij 
2 f abceghij 
2 g abcdfhij 
2 h abcdefij 
2 i abcdefgj 
2 j abcdeghi 
1 abcdefgh 
1 abcdefgi 
1 ...

result:

ok ok, n = 10, k = 9, groups = 637

Test #118:

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

input:

10 10

output:

512
2 abcde fghij 
2 abcdf eghij 
2 abcef dghij 
2 abdef cghij 
2 acdef bghij 
2 bcdef aghij 
2 abcdg efhij 
2 abceg dfhij 
2 abdeg cfhij 
2 acdeg bfhij 
2 bcdeg afhij 
2 abcfg dehij 
2 abdfg cehij 
2 acdfg behij 
2 bcdfg aehij 
2 abefg cdhij 
2 acefg bdhij 
2 bcefg adhij 
2 adefg bchij 
2 bdefg ach...

result:

ok ok, n = 10, k = 10, groups = 512

Test #119:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

10 4

output:

353
2 ab cf 
2 ac gi 
2 bc fh 
2 ad gh 
2 bd ci 
2 cd ei 
2 ae bi 
2 be aj 
2 ce fi 
2 de hj 
2 af eg 
2 bf cj 
2 df eh 
2 ef ch 
2 ag bj 
2 bg ai 
2 cg ej 
2 dg ij 
2 fg dh 
2 ah dj 
2 bh fj 
2 di gj 
1 hi 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
1 abcf 
1 abdf 
1 acdf 
1 bcdf 
1 abef 
1 acef 
1 bc...

result:

ok ok, n = 10, k = 4, groups = 353

Test #120:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

10 3

output:

165
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 10, k = 3, groups = 165

Test #121:

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

input:

10 2

output:

50
2 a c 
2 b j 
2 d i 
2 e f 
2 g h 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 
1 aj 
1 bj 
1 cj 
1 dj 
1 ej 
1 fj 
1 gj 
1 hj...

result:

ok ok, n = 10, k = 2, groups = 50

Test #122:

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

input:

10 6

output:

732
2 abc efh 
2 abd gij 
2 acd fgi 
2 bcd aeh 
2 abe dgj 
2 ace bdf 
2 bce dhj 
2 ade cij 
2 bde fhj 
2 cde ghi 
2 abf hij 
2 acf dei 
2 bcf adi 
2 adf ghj 
2 cdf egh 
2 aef dij 
2 bef dgi 
2 cef agi 
2 def bhj 
2 abg cdi 
2 acg bdh 
2 bcg ahj 
2 adg chi 
2 bdg aij 
2 cdg abh 
2 aeg cdh 
2 beg dfh ...

result:

ok ok, n = 10, k = 6, groups = 732

Test #123:

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

input:

10 5

output:

582
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh ...

result:

ok ok, n = 10, k = 5, groups = 582

Test #124:

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

input:

9 8

output:

318
2 abcd efgi 
2 abce dfgh 
2 abde cfgh 
2 acde bfhi 
2 bcde fghi 
2 abcf eghi 
2 abdf cegi 
2 acdf bghi 
2 bcdf aegh 
2 abef dghi 
2 acef bdgi 
2 bcef adgi 
2 adef cghi 
2 bdef aghi 
2 cdef abhi 
2 abcg efhi 
2 abdg cfhi 
2 acdg behi 
2 bcdg aefi 
2 abeg cdfi 
2 aceg dfhi 
2 bceg adfh 
2 adeg bch...

result:

ok ok, n = 9, k = 8, groups = 318

Test #125:

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

input:

9 4

output:

228
2 ab ch 
2 ac ef 
2 bc fh 
2 ad cf 
2 bd cg 
2 cd be 
2 ae di 
2 ce dg 
2 de bg 
2 af bi 
2 bf gh 
2 df ag 
2 eg ai 
2 fg hi 
2 ah gi 
2 bh ei 
2 dh ci 
2 eh fi 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
1 abcf 
1 abdf 
1 acdf 
1 bcdf 
1 abef 
1 acef 
1 bcef 
1 adef 
1 bdef 
1 cdef 
1 abcg 
1 abdg...

result:

ok ok, n = 9, k = 4, groups = 228

Test #126:

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

input:

9 7

output:

372
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
1 abcdefi 
1 abcdegi 
1 abcdfgi 
1 abcefgi 
1 abdefgi 
1 acdefgi 
1 bcdefgi 
1 abcdehi 
1 abcdfhi 
1 abcefhi 
1 abdefhi 
1 acdefhi 
1 bcdefhi 
1 abcdghi 
1 abceghi 
1 abdeghi 
1 acdeghi 
1 bcdeghi 
1 abcfghi ...

result:

ok ok, n = 9, k = 7, groups = 372

Test #127:

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

input:

9 5

output:

336
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh ...

result:

ok ok, n = 9, k = 5, groups = 336

Test #128:

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

input:

9 6

output:

378
2 abc deg 
2 abd cfh 
2 acd bef 
2 bcd agh 
2 abe dgh 
2 ace bdi 
2 bce dfh 
2 ade cfi 
2 bde ahi 
2 cde bgh 
2 abf dgi 
2 acf egi 
2 bcf dhi 
2 adf cei 
2 bdf cgh 
2 cdf bhi 
2 aef ghi 
2 cef abi 
2 def abg 
2 acg efh 
2 bcg aei 
2 adg fhi 
2 bdg ehi 
2 cdg bfh 
2 aeg bdh 
2 beg aci 
2 ceg bfi ...

result:

ok ok, n = 9, k = 6, groups = 378

Test #129:

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

input:

9 1

output:

9
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 
1 i 

result:

ok ok, n = 9, k = 1, groups = 9

Test #130:

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

input:

9 3

output:

120
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 ...

result:

ok ok, n = 9, k = 3, groups = 120

Test #131:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

9 2

output:

41
2 a i 
2 b e 
2 c f 
2 d g 
1 h 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 
1 ai 
1 bi 
1 ci 
1 di 
1 ei 
1 fi 
1 gi 
1 hi 

result:

ok ok, n = 9, k = 2, groups = 41

Test #132:

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

input:

8 7

output:

162
1 abcdefg 
1 abcdefh 
1 abcdegh 
1 abcdfgh 
1 abcefgh 
1 abdefgh 
1 acdefgh 
1 bcdefgh 
2 a bcdfgh 
2 b adefgh 
2 c bdefgh 
2 d abefgh 
2 e abcdfg 
2 f abcdgh 
2 g bcdefh 
2 h abcefg 
1 abcdef 
1 abcdeg 
1 abdefg 
1 acdefg 
1 bcdefg 
1 abcdeh 
1 abcdfh 
1 abcefh 
1 abdefh 
1 acdefh 
1 abcegh 
1 ...

result:

ok ok, n = 8, k = 7, groups = 162

Test #133:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

8 4

output:

140
2 ab dg 
2 ac eg 
2 bc ah 
2 ad cf 
2 bd ch 
2 cd ae 
2 be ag 
2 ce bh 
2 de af 
2 bf eh 
2 df bg 
2 ef gh 
2 cg fh 
2 fg dh 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde 
1 abcf 
1 abdf 
1 acdf 
1 bcdf 
1 abef 
1 acef 
1 bcef 
1 adef 
1 bdef 
1 cdef 
1 abcg 
1 abdg 
1 acdg 
1 bcdg 
1 abeg 
1 aceg 
1 ...

result:

ok ok, n = 8, k = 4, groups = 140

Test #134:

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

input:

8 1

output:

8
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 
1 h 

result:

ok ok, n = 8, k = 1, groups = 8

Test #135:

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

input:

8 6

output:

182
2 abc fgh 
2 abd cgh 
2 acd efg 
2 bcd aef 
2 abe cfh 
2 ace dfh 
2 bce afg 
2 ade bcf 
2 bde agh 
2 cde abg 
2 abf egh 
2 acf dgh 
2 adf bcg 
2 bdf ceh 
2 cdf bgh 
2 bef adg 
2 cef bdh 
2 def ach 
2 acg bfh 
2 bdg efh 
2 cdg aeh 
2 aeg cdh 
2 beg afh 
2 ceg adh 
2 deg bch 
2 bfg deh 
2 cfg beh ...

result:

ok ok, n = 8, k = 6, groups = 182

Test #136:

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

input:

8 5

output:

182
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
1 abcdh 
1 abceh 
1 abdeh 
1 acdeh 
1 bcdeh 
1 abcfh 
1 abdfh 
1 acdfh 
1 bcdfh 
1 abefh 
1 acefh 
1 bcefh ...

result:

ok ok, n = 8, k = 5, groups = 182

Test #137:

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

input:

8 2

output:

32
2 a e 
2 b g 
2 c h 
2 d f 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 
1 af 
1 bf 
1 cf 
1 df 
1 ef 
1 ag 
1 bg 
1 cg 
1 dg 
1 eg 
1 fg 
1 ah 
1 bh 
1 ch 
1 dh 
1 eh 
1 fh 
1 gh 

result:

ok ok, n = 8, k = 2, groups = 32

Test #138:

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

input:

8 8

output:

128
2 abcd efgh 
2 abce dfgh 
2 abde cfgh 
2 acde bfgh 
2 bcde afgh 
2 abcf degh 
2 abdf cegh 
2 acdf begh 
2 bcdf aegh 
2 abef cdgh 
2 acef bdgh 
2 bcef adgh 
2 adef bcgh 
2 bdef acgh 
2 cdef abgh 
2 abcg defh 
2 abdg cefh 
2 acdg befh 
2 bcdg aefh 
2 abeg cdfh 
2 aceg bdfh 
2 bceg adfh 
2 adeg bcf...

result:

ok ok, n = 8, k = 8, groups = 128

Test #139:

score: 0
Accepted
time: 1ms
memory: 3748kb

input:

8 3

output:

84
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
1 abh 
1 ach 
1 bch 
1 adh 
1 bdh 
1 cdh 
1 aeh 
1 b...

result:

ok ok, n = 8, k = 3, groups = 84

Test #140:

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

input:

7 5

output:

91
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
1 abcdg 
1 abceg 
1 abdeg 
1 acdeg 
1 bcdeg 
1 abcfg 
1 abdfg 
1 acdfg 
1 bcdfg 
1 abefg 
1 acefg 
1 bcefg 
1 adefg 
1 bdefg 
1 cdefg 
2 a bdeg 
2 b cdeg 
2 c adeg 
2 d acfg 
2 e bcdf 
2 f bcdg 
2 g acdf 
1 abcd 
1 abce 
1 abde 
1 acde 
1 bcde...

result:

ok ok, n = 7, k = 5, groups = 91

Test #141:

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

input:

7 3

output:

56
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
1 abg 
1 acg 
1 bcg 
1 adg 
1 bdg 
1 cdg 
1 aeg 
1 beg 
1 ceg 
1 deg 
1 afg 
1 bfg 
1 cfg 
1 dfg 
1 efg 
2 a cf 
2 b df 
2 c bf 
2 d ag 
2 e bd 
2 f ce 
2 g ...

result:

ok ok, n = 7, k = 3, groups = 56

Test #142:

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

input:

7 1

output:

7
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 
1 g 

result:

ok ok, n = 7, k = 1, groups = 7

Test #143:

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

input:

7 6

output:

81
2 abc def 
2 abd cfg 
2 acd efg 
2 bcd afg 
2 abe dfg 
2 ace bdf 
2 bce adf 
2 ade bcg 
2 bde acg 
2 cde bfg 
2 abf ceg 
2 acf beg 
2 bcf adg 
2 cdf aeg 
2 aef bdg 
2 bef cdg 
2 cef abg 
1 deg 
1 abcdef 
1 abcdeg 
1 abcdfg 
1 abcefg 
1 abdefg 
1 acdefg 
1 bcdefg 
2 a bcdfg 
2 b acdfg 
2 c adefg 
...

result:

ok ok, n = 7, k = 6, groups = 81

Test #144:

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

input:

7 7

output:

64
1 abcdefg 
2 a bcdefg 
2 b acdefg 
2 c abdefg 
2 d abcefg 
2 e abcdfg 
2 f abcdeg 
2 g abcdef 
2 ab cdefg 
2 ac bdefg 
2 bc adefg 
2 ad bcefg 
2 bd acefg 
2 cd abefg 
2 ae bcdfg 
2 be acdfg 
2 ce abdfg 
2 de abcfg 
2 af bcdeg 
2 bf acdeg 
2 cf abdeg 
2 df abceg 
2 ef abcdg 
2 ag bcdef 
2 bg acdef...

result:

ok ok, n = 7, k = 7, groups = 64

Test #145:

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

input:

6 3

output:

35
1 abc 
1 abd 
1 acd 
1 bcd 
1 abe 
1 ace 
1 bce 
1 ade 
1 bde 
1 cde 
1 abf 
1 acf 
1 bcf 
1 adf 
1 bdf 
1 cdf 
1 aef 
1 bef 
1 cef 
1 def 
2 a cf 
2 b ae 
2 c bf 
2 d ab 
2 e bd 
2 f ce 
1 ac 
1 bc 
1 ad 
1 cd 
1 be 
1 de 
1 af 
1 df 
1 ef 

result:

ok ok, n = 6, k = 3, groups = 35

Test #146:

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

input:

6 5

output:

41
1 abcde 
1 abcdf 
1 abcef 
1 abdef 
1 acdef 
1 bcdef 
2 a bcef 
2 b adef 
2 c abef 
2 d abce 
2 e bcdf 
2 f acde 
1 abcd 
1 abde 
1 bcde 
1 abcf 
1 abdf 
1 acdf 
1 acef 
1 bdef 
1 cdef 
2 ab cdf 
2 ac bdf 
2 bc def 
2 ad bce 
2 bd acf 
2 cd aef 
2 ae bcd 
2 be adf 
2 ce abf 
2 de bcf 
2 af bde 
2...

result:

ok ok, n = 6, k = 5, groups = 41

Test #147:

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

input:

6 6

output:

32
2 abc def 
2 abd cef 
2 acd bef 
2 bcd aef 
2 abe cdf 
2 ace bdf 
2 bce adf 
2 ade bcf 
2 bde acf 
2 cde abf 
1 abcdef 
2 a bcdef 
2 b acdef 
2 c abdef 
2 d abcef 
2 e abcdf 
2 f abcde 
2 ab cdef 
2 ac bdef 
2 bc adef 
2 ad bcef 
2 bd acef 
2 cd abef 
2 ae bcdf 
2 be acdf 
2 ce abdf 
2 de abcf 
2...

result:

ok ok, n = 6, k = 6, groups = 32

Test #148:

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

input:

6 1

output:

6
1 a 
1 b 
1 c 
1 d 
1 e 
1 f 

result:

ok ok, n = 6, k = 1, groups = 6

Test #149:

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

input:

5 2

output:

13
2 a e 
2 b c 
1 d 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 
1 ae 
1 be 
1 ce 
1 de 

result:

ok ok, n = 5, k = 2, groups = 13

Test #150:

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

input:

5 5

output:

16
1 abcde 
2 a bcde 
2 b acde 
2 c abde 
2 d abce 
2 e abcd 
2 ab cde 
2 ac bde 
2 bc ade 
2 ad bce 
2 bd ace 
2 cd abe 
2 ae bcd 
2 be acd 
2 ce abd 
2 de abc 

result:

ok ok, n = 5, k = 5, groups = 16

Test #151:

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

input:

5 1

output:

5
1 a 
1 b 
1 c 
1 d 
1 e 

result:

ok ok, n = 5, k = 1, groups = 5

Test #152:

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

input:

4 2

output:

8
2 a c 
2 b d 
1 ab 
1 ac 
1 bc 
1 ad 
1 bd 
1 cd 

result:

ok ok, n = 4, k = 2, groups = 8

Test #153:

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

input:

4 1

output:

4
1 a 
1 b 
1 c 
1 d 

result:

ok ok, n = 4, k = 1, groups = 4