QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#203217#2478. Tobacco GrowingPlentyOfPenalty#AC ✓21ms24820kbC++201.4kb2023-10-06 16:10:162023-10-06 16:10:16

Judging History

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

  • [2023-10-06 16:10:16]
  • 评测
  • 测评结果:AC
  • 用时:21ms
  • 内存:24820kb
  • [2023-10-06 16:10:16]
  • 提交

answer

#include "bits/stdc++.h"
typedef __int128 ll;/// remember __int128 !
const int MAXN = 200011;

ll f[111][111][111];
void init()
{
	for(int len=1;len<=101;++len)
	{
		//if(len<=20)printf("len=%d\n",len);
		for(int i=1;i<=len;++i)f[len][0][i]=0;
		f[len][0][1]=1;
		for(int d=1;d<=101;++d)
		{
			//if(len<=20&&d<=20)printf("D=%d:",d);
			for(int i=1;i<=len;++i)
			{
				f[len][d][i]=f[len][d-1][i-1]+f[len][d-1][i]+f[len][d-1][i+1];
				//if(len<=20&&d<=20)printf("%lld ",f[len][d][i]);
			}
			//if(len<=20&&d<=20)puts("");
		}
	}
}
int cnt[111];
int main()
{
	//freopen("E.out","w",stdout);
	init();
	long long tmp;
	scanf("%lld",&tmp);
	ll n=tmp;
	for(int d=2;d<=100;++d)
	{
		n=tmp;
		memset(cnt,0,sizeof cnt);
		int len=d+1,c=0;
		while(n&&c<10000)
		{
			int p=0;
			ll mx=0;
			for(int i=1;i<=len;++i)
				if(f[len][d][i]<=n&&f[len][d][i]>mx)mx=f[len][d][i],p=i;
			n-=mx,++cnt[p],++c;
		}
		if(n)continue;
		int v=0;
		for(int i=1;i<=len;++i)v=std::max(v,cnt[i]);
		int m=ll(v)*len,sx=0;
		if(m>2e5)continue;
		printf("%d\n",m);
		for(int i=1;i<=v;++i,sx+=2)
		{
			printf("%d 1 1\n",sx);	
			for(int j=2;j<=len;++j)
				printf("%d %d 0\n",sx,j);
		}
		printf("%d %d\n",c,d);
		sx=0;
		for(int i=1;i<=v;++i,sx+=2)
			for(int j=1;j<=len;++j)
				if(cnt[j])--cnt[j],printf("%d %d\n",sx,j);
		return 0;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1

output:

3
0 1 1
0 2 0
0 3 0
1 2
0 3

result:

ok correct solution!

Test #2:

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

input:

0

output:

0
0 2

result:

ok correct solution!

Test #3:

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

input:

14

output:

21
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
7 2
0 1
2 1
4 1
6 1
8 1
10 1
12 1

result:

ok correct solution!

Test #4:

score: 0
Accepted
time: 13ms
memory: 24332kb

input:

1000000000000000000

output:

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

result:

ok correct solution!

Test #5:

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

input:

999999999999999999

output:

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

result:

ok correct solution!

Test #6:

score: 0
Accepted
time: 13ms
memory: 23084kb

input:

999999999999999998

output:

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

result:

ok correct solution!

Test #7:

score: 0
Accepted
time: 13ms
memory: 23500kb

input:

999999999999999997

output:

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

result:

ok correct solution!

Test #8:

score: 0
Accepted
time: 13ms
memory: 24424kb

input:

999999999999999996

output:

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

result:

ok correct solution!

Test #9:

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

input:

999999999999999995

output:

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

result:

ok correct solution!

Test #10:

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

input:

999999999999999994

output:

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

result:

ok correct solution!

Test #11:

score: 0
Accepted
time: 13ms
memory: 24536kb

input:

999999999999999993

output:

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

result:

ok correct solution!

Test #12:

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

input:

999999999999999992

output:

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

result:

ok correct solution!

Test #13:

score: 0
Accepted
time: 13ms
memory: 23056kb

input:

999999999999999991

output:

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

result:

ok correct solution!

Test #14:

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

input:

35298

output:

28236
0 1 1
0 2 0
0 3 0
0 4 0
2 1 1
2 2 0
2 3 0
2 4 0
4 1 1
4 2 0
4 3 0
4 4 0
6 1 1
6 2 0
6 3 0
6 4 0
8 1 1
8 2 0
8 3 0
8 4 0
10 1 1
10 2 0
10 3 0
10 4 0
12 1 1
12 2 0
12 3 0
12 4 0
14 1 1
14 2 0
14 3 0
14 4 0
16 1 1
16 2 0
16 3 0
16 4 0
18 1 1
18 2 0
18 3 0
18 4 0
20 1 1
20 2 0
20 3 0
20 4 0
22 1 1...

result:

ok correct solution!

Test #15:

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

input:

69839

output:

29095
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
4 1 1
4 2 0
4 3 0
4 4 0
4 5 0
6 1 1
6 2 0
6 3 0
6 4 0
6 5 0
8 1 1
8 2 0
8 3 0
8 4 0
8 5 0
10 1 1
10 2 0
10 3 0
10 4 0
10 5 0
12 1 1
12 2 0
12 3 0
12 4 0
12 5 0
14 1 1
14 2 0
14 3 0
14 4 0
14 5 0
16 1 1
16 2 0
16 3 0
16 4 0
16 5 0
18 1...

result:

ok correct solution!

Test #16:

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

input:

64552

output:

26895
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
4 1 1
4 2 0
4 3 0
4 4 0
4 5 0
6 1 1
6 2 0
6 3 0
6 4 0
6 5 0
8 1 1
8 2 0
8 3 0
8 4 0
8 5 0
10 1 1
10 2 0
10 3 0
10 4 0
10 5 0
12 1 1
12 2 0
12 3 0
12 4 0
12 5 0
14 1 1
14 2 0
14 3 0
14 4 0
14 5 0
16 1 1
16 2 0
16 3 0
16 4 0
16 5 0
18 1...

result:

ok correct solution!

Test #17:

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

input:

9330

output:

13995
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
2...

result:

ok correct solution!

Test #18:

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

input:

39491

output:

31592
0 1 1
0 2 0
0 3 0
0 4 0
2 1 1
2 2 0
2 3 0
2 4 0
4 1 1
4 2 0
4 3 0
4 4 0
6 1 1
6 2 0
6 3 0
6 4 0
8 1 1
8 2 0
8 3 0
8 4 0
10 1 1
10 2 0
10 3 0
10 4 0
12 1 1
12 2 0
12 3 0
12 4 0
14 1 1
14 2 0
14 3 0
14 4 0
16 1 1
16 2 0
16 3 0
16 4 0
18 1 1
18 2 0
18 3 0
18 4 0
20 1 1
20 2 0
20 3 0
20 4 0
22 1 1...

result:

ok correct solution!

Test #19:

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

input:

140506867

output:

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

result:

ok correct solution!

Test #20:

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

input:

414385616

output:

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

result:

ok correct solution!

Test #21:

score: 0
Accepted
time: 8ms
memory: 22992kb

input:

82559469

output:

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

result:

ok correct solution!

Test #22:

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

input:

95538099

output:

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

result:

ok correct solution!

Test #23:

score: 0
Accepted
time: 8ms
memory: 23552kb

input:

184040515

output:

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

result:

ok correct solution!

Test #24:

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

input:

4

output:

6
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
2 2
0 1
2 1

result:

ok correct solution!

Test #25:

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

input:

3

output:

3
0 1 1
0 2 0
0 3 0
2 2
0 1
0 3

result:

ok correct solution!

Test #26:

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

input:

5

output:

6
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
3 2
0 1
0 3
2 1

result:

ok correct solution!

Test #27:

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

input:

8

output:

12
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
4 2
0 1
2 1
4 1
6 1

result:

ok correct solution!

Test #28:

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

input:

7

output:

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

result:

ok correct solution!

Test #29:

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

input:

9

output:

12
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
5 2
0 1
0 3
2 1
4 1
6 1

result:

ok correct solution!

Test #30:

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

input:

16

output:

24
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
8 2
0 1
2 1
4 1
6 1
8 1
10 1
12 1
14 1

result:

ok correct solution!

Test #31:

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

input:

15

output:

21
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
8 2
0 1
0 3
2 1
4 1
6 1
8 1
10 1
12 1

result:

ok correct solution!

Test #32:

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

input:

17

output:

24
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
9 2
0 1
0 3
2 1
4 1
6 1
8 1
10 1
12 1
14 1

result:

ok correct solution!

Test #33:

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

input:

32

output:

48
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 3...

result:

ok correct solution!

Test #34:

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

input:

31

output:

45
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 3...

result:

ok correct solution!

Test #35:

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

input:

33

output:

48
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 3...

result:

ok correct solution!

Test #36:

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

input:

64

output:

96
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 3...

result:

ok correct solution!

Test #37:

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

input:

63

output:

93
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 3...

result:

ok correct solution!

Test #38:

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

input:

65

output:

96
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 3...

result:

ok correct solution!

Test #39:

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

input:

128

output:

192
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #40:

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

input:

127

output:

189
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #41:

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

input:

129

output:

192
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #42:

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

input:

256

output:

384
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #43:

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

input:

255

output:

381
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #44:

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

input:

257

output:

384
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #45:

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

input:

512

output:

768
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #46:

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

input:

511

output:

765
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #47:

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

input:

513

output:

768
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28 ...

result:

ok correct solution!

Test #48:

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

input:

1024

output:

1536
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28...

result:

ok correct solution!

Test #49:

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

input:

1023

output:

1533
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28...

result:

ok correct solution!

Test #50:

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

input:

1025

output:

1536
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28...

result:

ok correct solution!

Test #51:

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

input:

2048

output:

3072
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28...

result:

ok correct solution!

Test #52:

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

input:

2047

output:

3069
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28...

result:

ok correct solution!

Test #53:

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

input:

2049

output:

3072
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
12 1 1
12 2 0
12 3 0
14 1 1
14 2 0
14 3 0
16 1 1
16 2 0
16 3 0
18 1 1
18 2 0
18 3 0
20 1 1
20 2 0
20 3 0
22 1 1
22 2 0
22 3 0
24 1 1
24 2 0
24 3 0
26 1 1
26 2 0
26 3 0
28 1 1
28 2 0
28...

result:

ok correct solution!

Test #54:

score: 0
Accepted
time: 13ms
memory: 24156kb

input:

18014398509481984

output:

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

result:

ok correct solution!

Test #55:

score: 0
Accepted
time: 13ms
memory: 23676kb

input:

18014398509481983

output:

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

result:

ok correct solution!

Test #56:

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

input:

18014398509481985

output:

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

result:

ok correct solution!

Test #57:

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

input:

36028797018963968

output:

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

result:

ok correct solution!

Test #58:

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

input:

36028797018963967

output:

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

result:

ok correct solution!

Test #59:

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

input:

36028797018963969

output:

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

result:

ok correct solution!

Test #60:

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

input:

72057594037927936

output:

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

result:

ok correct solution!

Test #61:

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

input:

72057594037927935

output:

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

result:

ok correct solution!

Test #62:

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

input:

72057594037927937

output:

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

result:

ok correct solution!

Test #63:

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

input:

144115188075855872

output:

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

result:

ok correct solution!

Test #64:

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

input:

144115188075855871

output:

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

result:

ok correct solution!

Test #65:

score: 0
Accepted
time: 21ms
memory: 24520kb

input:

144115188075855873

output:

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

result:

ok correct solution!

Test #66:

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

input:

288230376151711744

output:

82382
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
0 6 0
0 7 0
0 8 0
0 9 0
0 10 0
0 11 0
0 12 0
0 13 0
0 14 0
0 15 0
0 16 0
0 17 0
0 18 0
0 19 0
0 20 0
0 21 0
0 22 0
0 23 0
0 24 0
0 25 0
0 26 0
0 27 0
0 28 0
0 29 0
0 30 0
0 31 0
0 32 0
0 33 0
0 34 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
2 6 0
2 7 0
2 8 0
2 9 0
2 10 0
2 11...

result:

ok correct solution!

Test #67:

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

input:

288230376151711743

output:

82382
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
0 6 0
0 7 0
0 8 0
0 9 0
0 10 0
0 11 0
0 12 0
0 13 0
0 14 0
0 15 0
0 16 0
0 17 0
0 18 0
0 19 0
0 20 0
0 21 0
0 22 0
0 23 0
0 24 0
0 25 0
0 26 0
0 27 0
0 28 0
0 29 0
0 30 0
0 31 0
0 32 0
0 33 0
0 34 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
2 6 0
2 7 0
2 8 0
2 9 0
2 10 0
2 11...

result:

ok correct solution!

Test #68:

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

input:

288230376151711745

output:

82382
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
0 6 0
0 7 0
0 8 0
0 9 0
0 10 0
0 11 0
0 12 0
0 13 0
0 14 0
0 15 0
0 16 0
0 17 0
0 18 0
0 19 0
0 20 0
0 21 0
0 22 0
0 23 0
0 24 0
0 25 0
0 26 0
0 27 0
0 28 0
0 29 0
0 30 0
0 31 0
0 32 0
0 33 0
0 34 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
2 6 0
2 7 0
2 8 0
2 9 0
2 10 0
2 11...

result:

ok correct solution!

Test #69:

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

input:

576460752303423488

output:

164798
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
0 6 0
0 7 0
0 8 0
0 9 0
0 10 0
0 11 0
0 12 0
0 13 0
0 14 0
0 15 0
0 16 0
0 17 0
0 18 0
0 19 0
0 20 0
0 21 0
0 22 0
0 23 0
0 24 0
0 25 0
0 26 0
0 27 0
0 28 0
0 29 0
0 30 0
0 31 0
0 32 0
0 33 0
0 34 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
2 6 0
2 7 0
2 8 0
2 9 0
2 10 0
2 1...

result:

ok correct solution!

Test #70:

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

input:

576460752303423487

output:

164798
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
0 6 0
0 7 0
0 8 0
0 9 0
0 10 0
0 11 0
0 12 0
0 13 0
0 14 0
0 15 0
0 16 0
0 17 0
0 18 0
0 19 0
0 20 0
0 21 0
0 22 0
0 23 0
0 24 0
0 25 0
0 26 0
0 27 0
0 28 0
0 29 0
0 30 0
0 31 0
0 32 0
0 33 0
0 34 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
2 6 0
2 7 0
2 8 0
2 9 0
2 10 0
2 1...

result:

ok correct solution!

Test #71:

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

input:

576460752303423489

output:

164798
0 1 1
0 2 0
0 3 0
0 4 0
0 5 0
0 6 0
0 7 0
0 8 0
0 9 0
0 10 0
0 11 0
0 12 0
0 13 0
0 14 0
0 15 0
0 16 0
0 17 0
0 18 0
0 19 0
0 20 0
0 21 0
0 22 0
0 23 0
0 24 0
0 25 0
0 26 0
0 27 0
0 28 0
0 29 0
0 30 0
0 31 0
0 32 0
0 33 0
0 34 0
2 1 1
2 2 0
2 3 0
2 4 0
2 5 0
2 6 0
2 7 0
2 8 0
2 9 0
2 10 0
2 1...

result:

ok correct solution!

Test #72:

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

input:

13

output:

18
0 1 1
0 2 0
0 3 0
2 1 1
2 2 0
2 3 0
4 1 1
4 2 0
4 3 0
6 1 1
6 2 0
6 3 0
8 1 1
8 2 0
8 3 0
10 1 1
10 2 0
10 3 0
7 2
0 1
0 3
2 1
4 1
6 1
8 1
10 1

result:

ok correct solution!