QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#85598#5236. Wersja dla profesjonalistów [A]anhduc27014 4ms3624kbC++231.8kb2023-03-07 22:01:072023-03-07 22:01:07

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-07 22:01:07]
  • 评测
  • 测评结果:4
  • 用时:4ms
  • 内存:3624kb
  • [2023-03-07 22:01:07]
  • 提交

answer

/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
*/
#include<bits/stdc++.h>
using namespace std;
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define eb emplace_back
#define PI 3.14159265359
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define BIT(x,i) (1&((x)>>(i)))
#define MASK(x) (1LL<<(x))
#define task "tnc"  
typedef long long ll;
const ll INF=1e18;
const int maxn=1e6+5;
const int mod=1e9+7;
const int mo=998244353;
using pi=pair<ll,ll>;
using vi=vector<ll>;
using pii=pair<pair<ll,ll>,ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

string mul(int x,string s){
	vector<int>q;
	while(x>0){
		q.pb(x%9);
		x/=9;
	}
	string ans;
	for(int i=0;i<q.size();i++){
		if(q[i]!=0){
			ans+=char('0'+q[i]);
			ans+="["+s+"]";
		}
		if(i!=len(q)-1){
			ans+="9[";
		}
	}
	for(int i=1;i<q.size();i++){
		ans+="]";
	}
	return ans;
}
vector<string>kq;
void recur(int n){
	if(n==1){
		kq.pb("A");
	}
	else if(n==2){
		kq.pb("AEACA");
	}
	else if(n==3){
		kq.pb("AEAEACCAEACA");
	}
	else if(n%2==1){
		int k=n/2;
		string s1=mul(k+1,"A");
		string s2=mul(k,"EC")+"E";
		kq.pb(mul(k,s1+s2)+"A");
		kq.pb(mul(k,"EA"));
		kq.pb("2[");
		kq.pb(mul(k,"C"));
		recur(k);
		kq.pb("]");
	}
	else{
		kq.pb("A");
		kq.pb(mul(n-1,"EA"));
		kq.pb(mul(n-1,"C"));
		recur(n-1);
	}
}
signed main()
{
	cin.tie(0),cout.tie(0)->sync_with_stdio(0);
    //freopen(task".inp" , "r" , stdin);
    //freopen(task".out" , "w" , stdout);
    int n;
    cin>>n;
    kq.pb(mul(n,"C"));
    recur(n);
    kq.pb(mul(n,"E"));
    for(auto v:kq){
    	cout<<v;
    }
    

    return 0;
}


Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 2ms
memory: 3496kb

input:

1

output:

1[C]A1[E]

result:

ok correct (length = 3)

Test #2:

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

input:

2

output:

2[C]AEACA2[E]

result:

ok correct (length = 13)

Test #3:

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

input:

4

output:

4[C]A3[EA]3[C]AEAEACCAEACA4[E]

result:

ok correct (length = 30)

Test #4:

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

input:

5

output:

5[C]2[3[A]2[EC]E]A2[EA]2[2[C]AEACA]5[E]

result:

ok correct (length = 43)

Test #5:

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

input:

6

output:

6[C]A5[EA]5[C]2[3[A]2[EC]E]A2[EA]2[2[C]AEACA]6[E]

result:

ok correct (length = 53)

Test #6:

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

input:

7

output:

7[C]3[4[A]3[EC]E]A3[EA]2[3[C]AEAEACCAEACA]7[E]

result:

ok correct (length = 53)

Test #7:

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

input:

10

output:

1[C]9[1[C]]A9[1[EA]]9[1[C]]4[5[A]4[EC]E]A4[EA]2[4[C]A3[EA]3[C]AEAEACCAEACA]1[E]9[1[E]]

result:

ok correct (length = 79)

Test #8:

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

input:

69

output:

6[C]9[7[C]]7[8[A]9[3[A]]7[EC]9[3[EC]]E]9[3[8[A]9[3[A]]7[EC]9[3[EC]]E]]A7[EA]9[3[EA]]2[7[C]9[3[C]]A6[EA]9[3[EA]]6[C]9[3[C]]7[8[A]9[1[A]]7[EC]9[1[EC]]E]9[1[8[A]9[1[A]]7[EC]9[1[EC]]E]]A7[EA]9[1[EA]]2[7[C]9[1[C]]A6[EA]9[1[EA]]6[C]9[1[C]]7[8[A]7[EC]E]A7[EA]2[7[C]3[4[A]3[EC]E]A3[EA]2[3[C]AEAEACCAEACA]]]]6...

result:

ok correct (length = 277)

Test #9:

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

input:

100

output:

1[C]9[2[C]9[1[C]]]A9[2[EA]9[1[EA]]]9[2[C]9[1[C]]]4[5[A]9[5[A]]4[EC]9[5[EC]]E]9[5[5[A]9[5[A]]4[EC]9[5[EC]]E]]A4[EA]9[5[EA]]2[4[C]9[5[C]]6[7[A]9[2[A]]6[EC]9[2[EC]]E]9[2[7[A]9[2[A]]6[EC]9[2[EC]]E]]A6[EA]9[2[EA]]2[6[C]9[2[C]]A5[EA]9[2[EA]]5[C]9[2[C]]2[3[A]9[1[A]]2[EC]9[1[EC]]E]9[1[3[A]9[1[A]]2[EC]9[1[EC...

result:

ok correct (length = 312)

Test #10:

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

input:

101

output:

2[C]9[2[C]9[1[C]]]5[6[A]9[5[A]]5[EC]9[5[EC]]E]9[5[6[A]9[5[A]]5[EC]9[5[EC]]E]]A5[EA]9[5[EA]]2[5[C]9[5[C]]A4[EA]9[5[EA]]4[C]9[5[C]]6[7[A]9[2[A]]6[EC]9[2[EC]]E]9[2[7[A]9[2[A]]6[EC]9[2[EC]]E]]A6[EA]9[2[EA]]2[6[C]9[2[C]]A5[EA]9[2[EA]]5[C]9[2[C]]2[3[A]9[1[A]]2[EC]9[1[EC]]E]9[1[3[A]9[1[A]]2[EC]9[1[EC]]E]]A...

result:

ok correct (length = 321)

Test #11:

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

input:

250

output:

7[C]9[9[3[C]]]A6[EA]9[9[3[EA]]]6[C]9[9[3[C]]]7[8[A]9[4[A]9[1[A]]]7[EC]9[4[EC]9[1[EC]]]E]9[4[8[A]9[4[A]9[1[A]]]7[EC]9[4[EC]9[1[EC]]]E]9[1[8[A]9[4[A]9[1[A]]]7[EC]9[4[EC]9[1[EC]]]E]]]A7[EA]9[4[EA]9[1[EA]]]2[7[C]9[4[C]9[1[C]]]A6[EA]9[4[EA]9[1[EA]]]6[C]9[4[C]9[1[C]]]7[8[A]9[6[A]]7[EC]9[6[EC]]E]9[6[8[A]9[...

result:

ok correct (length = 526)

Test #12:

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

input:

251

output:

8[C]9[9[3[C]]]8[9[5[A]9[1[A]]]8[EC]9[4[EC]9[1[EC]]]E]9[4[9[5[A]9[1[A]]]8[EC]9[4[EC]9[1[EC]]]E]9[1[9[5[A]9[1[A]]]8[EC]9[4[EC]9[1[EC]]]E]]]A8[EA]9[4[EA]9[1[EA]]]2[8[C]9[4[C]9[1[C]]]8[9[7[A]]8[EC]9[6[EC]]E]9[6[9[7[A]]8[EC]9[6[EC]]E]]A8[EA]9[6[EA]]2[8[C]9[6[C]]A7[EA]9[6[EA]]7[C]9[6[C]]3[4[A]9[3[A]]3[EC]...

result:

ok correct (length = 456)

Test #13:

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

input:

252

output:

9[1[C]9[3[C]]]A8[EA]9[9[3[EA]]]8[C]9[9[3[C]]]8[9[5[A]9[1[A]]]8[EC]9[4[EC]9[1[EC]]]E]9[4[9[5[A]9[1[A]]]8[EC]9[4[EC]9[1[EC]]]E]9[1[9[5[A]9[1[A]]]8[EC]9[4[EC]9[1[EC]]]E]]]A8[EA]9[4[EA]9[1[EA]]]2[8[C]9[4[C]9[1[C]]]8[9[7[A]]8[EC]9[6[EC]]E]9[6[9[7[A]]8[EC]9[6[EC]]E]]A8[EA]9[6[EA]]2[8[C]9[6[C]]A7[EA]9[6[EA...

result:

ok correct (length = 479)

Test #14:

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

input:

299

output:

2[C]9[6[C]9[3[C]]]5[6[A]9[7[A]9[1[A]]]5[EC]9[7[EC]9[1[EC]]]E]9[7[6[A]9[7[A]9[1[A]]]5[EC]9[7[EC]9[1[EC]]]E]9[1[6[A]9[7[A]9[1[A]]]5[EC]9[7[EC]9[1[EC]]]E]]]A5[EA]9[7[EA]9[1[EA]]]2[5[C]9[7[C]9[1[C]]]2[3[A]9[8[A]]2[EC]9[8[EC]]E]9[8[3[A]9[8[A]]2[EC]9[8[EC]]E]]A2[EA]9[8[EA]]2[2[C]9[8[C]]A1[EA]9[8[EA]]1[C]9...

result:

ok correct (length = 486)

Test #15:

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

input:

300

output:

3[C]9[6[C]9[3[C]]]A2[EA]9[6[EA]9[3[EA]]]2[C]9[6[C]9[3[C]]]5[6[A]9[7[A]9[1[A]]]5[EC]9[7[EC]9[1[EC]]]E]9[7[6[A]9[7[A]9[1[A]]]5[EC]9[7[EC]9[1[EC]]]E]9[1[6[A]9[7[A]9[1[A]]]5[EC]9[7[EC]9[1[EC]]]E]]]A5[EA]9[7[EA]9[1[EA]]]2[5[C]9[7[C]9[1[C]]]2[3[A]9[8[A]]2[EC]9[8[EC]]E]9[8[3[A]9[8[A]]2[EC]9[8[EC]]E]]A2[EA]...

result:

ok correct (length = 515)

Subtask #2:

score: 1
Accepted

Test #16:

score: 1
Accepted
time: 2ms
memory: 3460kb

input:

320

output:

5[C]9[8[C]9[3[C]]]A4[EA]9[8[EA]9[3[EA]]]4[C]9[8[C]9[3[C]]]6[7[A]9[8[A]9[1[A]]]6[EC]9[8[EC]9[1[EC]]]E]9[8[7[A]9[8[A]9[1[A]]]6[EC]9[8[EC]9[1[EC]]]E]9[1[7[A]9[8[A]9[1[A]]]6[EC]9[8[EC]9[1[EC]]]E]]]A6[EA]9[8[EA]9[1[EA]]]2[6[C]9[8[C]9[1[C]]]7[8[A]9[8[A]]7[EC]9[8[EC]]E]9[8[8[A]9[8[A]]7[EC]9[8[EC]]E]]A7[EA]...

result:

ok correct (length = 555)

Test #17:

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

input:

321

output:

6[C]9[8[C]9[3[C]]]7[8[A]9[8[A]9[1[A]]]7[EC]9[8[EC]9[1[EC]]]E]9[8[8[A]9[8[A]9[1[A]]]7[EC]9[8[EC]9[1[EC]]]E]9[1[8[A]9[8[A]9[1[A]]]7[EC]9[8[EC]9[1[EC]]]E]]]A7[EA]9[8[EA]9[1[EA]]]2[7[C]9[8[C]9[1[C]]]A6[EA]9[8[EA]9[1[EA]]]6[C]9[8[C]9[1[C]]]7[8[A]9[8[A]]7[EC]9[8[EC]]E]9[8[8[A]9[8[A]]7[EC]9[8[EC]]E]]A7[EA]...

result:

ok correct (length = 507)

Test #18:

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

input:

1000

output:

1[C]9[3[C]9[3[C]9[1[C]]]]A9[3[EA]9[3[EA]9[1[EA]]]]9[3[C]9[3[C]9[1[C]]]]4[5[A]9[1[A]9[6[A]]]4[EC]9[1[EC]9[6[EC]]]E]9[1[5[A]9[1[A]9[6[A]]]4[EC]9[1[EC]9[6[EC]]]E]9[6[5[A]9[1[A]9[6[A]]]4[EC]9[1[EC]9[6[EC]]]E]]]A4[EA]9[1[EA]9[6[EA]]]2[4[C]9[1[C]9[6[C]]]6[7[A]9[9[3[A]]]6[EC]9[9[3[EC]]]E]9[9[3[7[A]9[9[3[A]...

result:

ok correct (length = 809)

Test #19:

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

input:

1024

output:

7[C]9[5[C]9[3[C]9[1[C]]]]A6[EA]9[5[EA]9[3[EA]9[1[EA]]]]6[C]9[5[C]9[3[C]9[1[C]]]]7[8[A]9[2[A]9[6[A]]]7[EC]9[2[EC]9[6[EC]]]E]9[2[8[A]9[2[A]9[6[A]]]7[EC]9[2[EC]9[6[EC]]]E]9[6[8[A]9[2[A]9[6[A]]]7[EC]9[2[EC]9[6[EC]]]E]]]A7[EA]9[2[EA]9[6[EA]]]2[7[C]9[2[C]9[6[C]]]3[4[A]9[1[A]9[3[A]]]3[EC]9[1[EC]9[3[EC]]]E]...

result:

ok correct (length = 663)

Test #20:

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

input:

1235

output:

2[C]9[2[C]9[6[C]9[1[C]]]]5[6[A]9[5[A]9[7[A]]]5[EC]9[5[EC]9[7[EC]]]E]9[5[6[A]9[5[A]9[7[A]]]5[EC]9[5[EC]9[7[EC]]]E]9[7[6[A]9[5[A]9[7[A]]]5[EC]9[5[EC]9[7[EC]]]E]]]A5[EA]9[5[EA]9[7[EA]]]2[5[C]9[5[C]9[7[C]]]2[3[A]9[7[A]9[3[A]]]2[EC]9[7[EC]9[3[EC]]]E]9[7[3[A]9[7[A]9[3[A]]]2[EC]9[7[EC]9[3[EC]]]E]9[3[3[A]9[...

result:

ok correct (length = 934)

Test #21:

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

input:

4094

output:

8[C]9[4[C]9[5[C]9[5[C]]]]A7[EA]9[4[EA]9[5[EA]9[5[EA]]]]7[C]9[4[C]9[5[C]9[5[C]]]]3[4[A]9[2[A]9[7[A]9[2[A]]]]3[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[4[A]9[2[A]9[7[A]9[2[A]]]]3[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[7[4[A]9[2[A]9[7[A]9[2[A]]]]3[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[4[A]9[2[A]9[7[A]9[2[A]]]]3[EC]9[2[EC]9...

result:

ok correct (length = 1296)

Test #22:

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

input:

4095

output:

9[5[C]9[5[C]9[5[C]]]]4[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[7[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]]]]A4[EA]9[2[EA]9[7[EA]9[2[EA]]]]2[4[C]9[...

result:

ok correct (length = 1027)

Test #23:

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

input:

4096

output:

1[C]9[5[C]9[5[C]9[5[C]]]]A9[5[EA]9[5[EA]9[5[EA]]]]9[5[C]9[5[C]9[5[C]]]]4[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[7[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[5[A]9[2[A]9[7[A]9[2[A]]]]4[EC]9[2[EC]9[7[EC]9[2...

result:

ok correct (length = 1056)

Test #24:

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

input:

4097

output:

2[C]9[5[C]9[5[C]9[5[C]]]]5[6[A]9[2[A]9[7[A]9[2[A]]]]5[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[6[A]9[2[A]9[7[A]9[2[A]]]]5[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[7[6[A]9[2[A]9[7[A]9[2[A]]]]5[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]9[2[6[A]9[2[A]9[7[A]9[2[A]]]]5[EC]9[2[EC]9[7[EC]9[2[EC]]]]E]]]]A5[EA]9[2[EA]9[7[EA]9[2[EA]]]]2[5[...

result:

ok correct (length = 933)

Test #25:

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

input:

4998

output:

3[C]9[6[C]9[7[C]9[6[C]]]]A2[EA]9[6[EA]9[7[EA]9[6[EA]]]]2[C]9[6[C]9[7[C]9[6[C]]]]5[6[A]9[7[A]9[3[A]9[3[A]]]]5[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[7[6[A]9[7[A]9[3[A]9[3[A]]]]5[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[3[6[A]9[7[A]9[3[A]9[3[A]]]]5[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[3[6[A]9[7[A]9[3[A]9[3[A]]]]5[EC]9[7[EC]9...

result:

ok correct (length = 1662)

Test #26:

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

input:

4999

output:

4[C]9[6[C]9[7[C]9[6[C]]]]6[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[7[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[3[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[3[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]]]]A6[EA]9[7[EA]9[3[EA]9[3[EA]]]]2[6[...

result:

ok correct (length = 1391)

Test #27:

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

input:

5000

output:

5[C]9[6[C]9[7[C]9[6[C]]]]A4[EA]9[6[EA]9[7[EA]9[6[EA]]]]4[C]9[6[C]9[7[C]9[6[C]]]]6[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[7[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[3[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9[3[EC]9[3[EC]]]]E]9[3[7[A]9[7[A]9[3[A]9[3[A]]]]6[EC]9[7[EC]9...

result:

ok correct (length = 1427)

Subtask #3:

score: 1
Accepted

Test #28:

score: 1
Accepted
time: 2ms
memory: 3424kb

input:

1000000

output:

1[C]9[6[C]9[6[C]9[3[C]9[8[C]9[7[C]9[1[C]]]]]]]A9[6[EA]9[6[EA]9[3[EA]9[8[EA]9[7[EA]9[1[EA]]]]]]]9[6[C]9[6[C]9[3[C]9[8[C]9[7[C]9[1[C]]]]]]]4[5[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]4[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[EC]]]]]]E]9[7[5[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]4[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC...

result:

ok correct (length = 3639)

Test #29:

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

input:

999998

output:

8[C]9[5[C]9[6[C]9[3[C]9[8[C]9[7[C]9[1[C]]]]]]]A7[EA]9[5[EA]9[6[EA]9[3[EA]9[8[EA]9[7[EA]9[1[EA]]]]]]]7[C]9[5[C]9[6[C]9[3[C]9[8[C]9[7[C]9[1[C]]]]]]]3[4[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]3[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[EC]]]]]]E]9[7[4[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]3[EC]9[7[EC]9[7[EC]9[1[...

result:

ok correct (length = 3998)

Test #30:

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

input:

524286

output:

9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]A8[EA]9[5[EA]9[1[EA]9[8[EA]9[7[EA]9[8[EA]]]]]]8[C]9[5[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]8[9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]8[EC]9[2[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[2[9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]8[EC]9[2[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[5[9[3[A]...

result:

ok correct (length = 4435)

Test #31:

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

input:

524288

output:

2[C]9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]A1[EA]9[6[EA]9[1[EA]9[8[EA]9[7[EA]9[8[EA]]]]]]1[C]9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]9[3[1[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[5[1[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[8[1[...

result:

ok correct (length = 3385)

Test #32:

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

input:

524290

output:

4[C]9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]A3[EA]9[6[EA]9[1[EA]9[8[EA]9[7[EA]9[8[EA]]]]]]3[C]9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]1[2[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]1[EC]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[3[2[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]1[EC]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]...

result:

ok correct (length = 3262)

Test #33:

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

input:

786429

output:

9[9[7[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]4[5[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]4[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[4[5[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]4[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[3[5[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]4[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]...

result:

ok correct (length = 4370)

Test #34:

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

input:

786431

output:

2[C]9[9[7[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]5[6[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]5[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[4[6[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]5[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[3[6[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]5[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[...

result:

ok correct (length = 3562)

Test #35:

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

input:

951557

output:

5[C]9[5[C]9[2[C]9[9[1[C]9[7[C]9[1[C]]]]]]]2[3[A]9[7[A]9[5[A]9[4[A]9[9[8[A]]]]]]2[EC]9[7[EC]9[5[EC]9[4[EC]9[9[8[EC]]]]]]E]9[7[3[A]9[7[A]9[5[A]9[4[A]9[9[8[A]]]]]]2[EC]9[7[EC]9[5[EC]9[4[EC]9[9[8[EC]]]]]]E]9[5[3[A]9[7[A]9[5[A]9[4[A]9[9[8[A]]]]]]2[EC]9[7[EC]9[5[EC]9[4[EC]9[9[8[EC]]]]]]E]9[4[3[A]9[7[A]9[5...

result:

ok correct (length = 4718)

Test #36:

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

input:

838702

output:

1[C]9[3[C]9[4[C]9[7[C]9[1[C]9[5[C]9[1[C]]]]]]]A9[3[EA]9[4[EA]9[7[EA]9[1[EA]9[5[EA]9[1[EA]]]]]]]9[3[C]9[4[C]9[7[C]9[1[C]9[5[C]9[1[C]]]]]]]4[5[A]9[1[A]9[2[A]9[8[A]9[9[7[A]]]]]]4[EC]9[1[EC]9[2[EC]9[8[EC]9[9[7[EC]]]]]]E]9[1[5[A]9[1[A]9[2[A]9[8[A]9[9[7[A]]]]]]4[EC]9[1[EC]9[2[EC]9[8[EC]9[9[7[EC]]]]]]E]9[2...

result:

ok correct (length = 4235)

Subtask #4:

score: 1
Accepted

Test #37:

score: 1
Accepted
time: 1ms
memory: 3564kb

input:

999999

output:

9[6[C]9[6[C]9[3[C]9[8[C]9[7[C]9[1[C]]]]]]]4[5[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]4[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[EC]]]]]]E]9[7[5[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]4[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[EC]]]]]]E]9[7[5[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]4[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[...

result:

ok correct (length = 3585)

Test #38:

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

input:

999997

output:

7[C]9[5[C]9[6[C]9[3[C]9[8[C]9[7[C]9[1[C]]]]]]]3[4[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]3[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[EC]]]]]]E]9[7[4[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]3[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]9[8[EC]]]]]]E]9[7[4[A]9[7[A]9[7[A]9[1[A]9[4[A]9[8[A]]]]]]3[EC]9[7[EC]9[7[EC]9[1[EC]9[4[EC]...

result:

ok correct (length = 3895)

Test #39:

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

input:

524287

output:

1[C]9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]9[3[1[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[5[1[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[8[1[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[3[1[...

result:

ok correct (length = 3337)

Test #40:

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

input:

524289

output:

3[C]9[6[C]9[1[C]9[8[C]9[7[C]9[8[C]]]]]]1[2[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]1[EC]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[3[2[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]1[EC]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]]]]]]E]9[5[2[A]9[3[A]9[5[A]9[8[A]9[3[A]9[4[A]]]]]]1[EC]9[3[EC]9[5[EC]9[8[EC]9[3[EC]9[4[EC]...

result:

ok correct (length = 3207)

Test #41:

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

input:

786428

output:

8[C]9[8[C]9[6[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]A7[EA]9[8[EA]9[6[EA]9[7[EA]9[2[EA]9[4[EA]9[1[EA]]]]]]]7[C]9[8[C]9[6[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]3[4[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]3[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[4[4[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]3[EC]9[4[EC]9[3[EC]9[8[...

result:

ok correct (length = 4475)

Test #42:

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

input:

786430

output:

1[C]9[9[7[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]A9[9[7[EA]9[7[EA]9[2[EA]9[4[EA]9[1[EA]]]]]]]9[9[7[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]4[5[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]4[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[4[5[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]4[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]...

result:

ok correct (length = 4450)

Test #43:

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

input:

786432

output:

3[C]9[9[7[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]A2[EA]9[9[7[EA]9[7[EA]9[2[EA]9[4[EA]9[1[EA]]]]]]]2[C]9[9[7[C]9[7[C]9[2[C]9[4[C]9[1[C]]]]]]]5[6[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]5[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6[EC]]]]]]E]9[4[6[A]9[4[A]9[3[A]9[8[A]9[5[A]9[6[A]]]]]]5[EC]9[4[EC]9[3[EC]9[8[EC]9[5[EC]9[6...

result:

ok correct (length = 3610)

Test #44:

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

input:

724171

output:

4[C]9[3[C]9[3[C]9[3[C]9[2[C]9[3[C]9[1[C]]]]]]]6[7[A]9[1[A]9[6[A]9[1[A]9[1[A]9[6[A]]]]]]6[EC]9[1[EC]9[6[EC]9[1[EC]9[1[EC]9[6[EC]]]]]]E]9[1[7[A]9[1[A]9[6[A]9[1[A]9[1[A]9[6[A]]]]]]6[EC]9[1[EC]9[6[EC]9[1[EC]9[1[EC]9[6[EC]]]]]]E]9[6[7[A]9[1[A]9[6[A]9[1[A]9[1[A]9[6[A]]]]]]6[EC]9[1[EC]9[6[EC]9[1[EC]9[1[EC]...

result:

ok correct (length = 3973)

Test #45:

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

input:

868406

output:

5[C]9[9[2[C]9[3[C]9[6[C]9[5[C]9[1[C]]]]]]]A4[EA]9[9[2[EA]9[3[EA]9[6[EA]9[5[EA]9[1[EA]]]]]]]4[C]9[9[2[C]9[3[C]9[6[C]9[5[C]9[1[C]]]]]]]6[7[A]9[4[A]9[5[A]9[1[A]9[3[A]9[7[A]]]]]]6[EC]9[4[EC]9[5[EC]9[1[EC]9[3[EC]9[7[EC]]]]]]E]9[4[7[A]9[4[A]9[5[A]9[1[A]9[3[A]9[7[A]]]]]]6[EC]9[4[EC]9[5[EC]9[1[EC]9[3[EC]9[7...

result:

ok correct (length = 3980)

Subtask #5:

score: 0
Wrong Answer

Test #46:

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

input:

10000000000

output:

1[C]9[7[C]9[6[C]9[3[C]9[7[C]9[7[C]9[8[C]9[7[C]9[4[C]9[5[C]]]]]]]]]]9[8[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1[EC]9[8[EC]9[3[EC]9[4[EC]9[8[EC]9[6[EC]9[2[EC]]]]]]]]]]E]9[7[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1...

result:

wrong answer incorrect path

Subtask #6:

score: 0
Wrong Answer

Test #55:

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

input:

9999999999

output:

1[C]9[7[C]9[6[C]9[3[C]9[7[C]9[7[C]9[8[C]9[7[C]9[4[C]9[5[C]]]]]]]]]]9[8[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1[EC]9[8[EC]9[3[EC]9[4[EC]9[8[EC]9[6[EC]9[2[EC]]]]]]]]]]E]9[7[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1...

result:

wrong answer incorrect path

Subtask #7:

score: 0
Wrong Answer

Test #64:

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

input:

100000000000000

output:

1[C]9[7[C]9[6[C]9[3[C]9[7[C]9[7[C]9[8[C]9[7[C]9[4[C]9[5[C]]]]]]]]]]9[8[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1[EC]9[8[EC]9[3[EC]9[4[EC]9[8[EC]9[6[EC]9[2[EC]]]]]]]]]]E]9[7[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1...

result:

wrong answer incorrect path

Subtask #8:

score: 0
Wrong Answer

Test #84:

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

input:

99999999999999

output:

1[C]9[7[C]9[6[C]9[3[C]9[7[C]9[7[C]9[8[C]9[7[C]9[4[C]9[5[C]]]]]]]]]]9[8[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1[EC]9[8[EC]9[3[EC]9[4[EC]9[8[EC]9[6[EC]9[2[EC]]]]]]]]]]E]9[7[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1...

result:

wrong answer incorrect path

Subtask #9:

score: 0
Wrong Answer

Test #103:

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

input:

1000000000000000000

output:

1[C]9[7[C]9[6[C]9[3[C]9[7[C]9[7[C]9[8[C]9[7[C]9[4[C]9[5[C]]]]]]]]]]9[8[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1[EC]9[8[EC]9[3[EC]9[4[EC]9[8[EC]9[6[EC]9[2[EC]]]]]]]]]]E]9[7[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1...

result:

wrong answer incorrect path

Subtask #10:

score: 0
Wrong Answer

Test #128:

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

input:

999999999999999999

output:

1[C]9[7[C]9[6[C]9[3[C]9[7[C]9[7[C]9[8[C]9[7[C]9[4[C]9[5[C]]]]]]]]]]9[8[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1[EC]9[8[EC]9[3[EC]9[4[EC]9[8[EC]9[6[EC]9[2[EC]]]]]]]]]]E]9[7[1[A]9[8[A]9[7[A]9[1[A]9[8[A]9[3[A]9[4[A]9[8[A]9[6[A]9[2[A]]]]]]]]]]9[8[EC]9[7[EC]9[1...

result:

wrong answer incorrect path