QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#75224 | #5236. Wersja dla profesjonalistów [A] | yx20220802 | 4 | 2ms | 3528kb | C++14 | 1.8kb | 2023-02-04 16:54:14 | 2023-02-04 16:54:26 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
namespace IO_ER{
#define LL long long
#define db double
#define In inline
#define ULL unsigned long long
#define f(a,b,i) for(int i=a;i<=b;i++)
#define ff(a,b,i) for(int i=a;i<b;i++)
#define f_(a,b,i) for(int i=a;i>=b;i--)
#define ff_(a,b,i) for(int i=a;i>b;i--)
typedef pair<int,int> Pi;
const int inf=0x3f3f3f3f;
const int INF=0x7fffffff;
const LL infll=0x3f3f3f3f3f3f3f3fll;
const LL INFll=0x7fffffffffffffffll;
int f=0;
char ChAR;
template<typename T>void read(T &x){
x=0;
f=0;
ChAR=getchar();
while(ChAR<'0'||ChAR>'9'){
if(ChAR=='-')f=1;
ChAR=getchar();
}
while('0'<=ChAR&&ChAR<='9'){
x=(x<<1)+(x<<3)+(ChAR^48);
ChAR=getchar();
}
x=f?-x:x;
}
template<typename T,typename ...Args>void read(T &x,Args &...args){
read(x);
read(args...);
}
}
using namespace IO_ER;
#define N 301050
#define mod 1000000007
int n;
/*
翻转
A B C D E F
右 右下 左下 左 左上 右上
*/
string repeat(string s,int len){
if(s.empty()||!len)return "";
if(len==1)return s;
string res;
res.push_back(len+'0');
if(len<=9)return res+"["+s+"]";
return "9["+repeat(s,len/9)+"]"+repeat(s,len%9);
}
string dfs(int len){
if(len==1)return "A";
if(len==2)return "AEACA";
int mid=len>>1;
string res;
if(len&1){
res=repeat(dfs(mid),2);
res+=repeat("FD",len-1);
res+=repeat(repeat("BD",mid)+"B"+repeat("F",mid),mid);
res+=repeat("B",mid);
res+="A";
return res;
}
else{
res=dfs(len-1);
res+=repeat("E",len-1);
res+=repeat("AC",len-1);
res+="A";
return res;
}
}
int main(){
// freopen("counting.in","r",stdin);
// freopen("counting.out","w",stdout);
// freopen("1.txt","w",stdout);
read(n);
cout<<dfs(n)+repeat("E",n)+repeat("C",n);
return 0;
}
詳細信息
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 0ms
memory: 3368kb
input:
1
output:
AEC
result:
ok correct (length = 3)
Test #2:
score: 0
Accepted
time: 0ms
memory: 3412kb
input:
2
output:
AEACA2[E]2[C]
result:
ok correct (length = 13)
Test #3:
score: 0
Accepted
time: 2ms
memory: 3380kb
input:
4
output:
2[A]2[FD]BDBFBA3[E]3[AC]A4[E]4[C]
result:
ok correct (length = 30)
Test #4:
score: 0
Accepted
time: 0ms
memory: 3416kb
input:
5
output:
2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[C]
result:
ok correct (length = 43)
Test #5:
score: 0
Accepted
time: 2ms
memory: 3416kb
input:
6
output:
2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A6[E]6[C]
result:
ok correct (length = 53)
Test #6:
score: 0
Accepted
time: 2ms
memory: 3408kb
input:
7
output:
2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[C]
result:
ok correct (length = 53)
Test #7:
score: 0
Accepted
time: 2ms
memory: 3380kb
input:
10
output:
2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A9[E]9[AC]A9[E]E9[C]C
result:
ok correct (length = 79)
Test #8:
score: 0
Accepted
time: 2ms
memory: 3372kb
input:
69
output:
2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A9[E]6[E]9[AC]6[AC]A]9[3[FD]]5[FD]9[9[BD]7[BD]B9[F]7[F]]7[9[BD]7[BD]B9[F]7[F]]9[B]7[B]A9[3[E]]6[E]9[3[AC]]6[AC]A]9[7[FD]]5[FD]9[3[9[3[BD]]7[BD]B9[3[F]]7[F]]]7[9[3[BD]]7[BD]B9[3[F]]7[F]]9[3[B]]7[B]A9[7[E]]6[E]9[7[C]]6[C]
result:
ok correct (length = 277)
Test #9:
score: 0
Accepted
time: 0ms
memory: 3340kb
input:
100
output:
2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A]9[FD]FD5[5[BD]B5[F]]5[B]A]9[2[FD]]4[FD]9[9[BD]2[BD]B9[F]2[F]]2[9[BD]2[BD]B9[F]2[F]]9[B]2[B]A9[2[E]]5[E]9[2[AC]]5[AC]A]9[5[FD]]3[FD]9[2[9[2[BD]]6[BD]B9[2[F]]6[F]]]6[9[2[BD]]6[BD]B9[2[F]]6[F]]9[2[B]]6[B]A]9[9[FD]FD]8[FD]9[5[9[5[BD]]4[BD]B9[5[F]]4[F]]]4[9[5[BD]]4...
result:
ok correct (length = 312)
Test #10:
score: 0
Accepted
time: 2ms
memory: 3496kb
input:
101
output:
2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A]9[FD]FD5[5[BD]B5[F]]5[B]A]9[2[FD]]4[FD]9[9[BD]2[BD]B9[F]2[F]]2[9[BD]2[BD]B9[F]2[F]]9[B]2[B]A9[2[E]]5[E]9[2[AC]]5[AC]A]9[5[FD]]3[FD]9[2[9[2[BD]]6[BD]B9[2[F]]6[F]]]6[9[2[BD]]6[BD]B9[2[F]]6[F]]9[2[B]]6[B]A9[5[E]]4[E]9[5[AC]]4[AC]A]9[9[FD]2[FD]]FD9[5[9[5[BD]]5[BD]...
result:
ok correct (length = 321)
Test #11:
score: 0
Accepted
time: 2ms
memory: 3372kb
input:
250
output:
2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A9[3[E]]2[E]9[3[AC]]2[AC]A]9[6[FD]]6[FD]9[3[9[3[BD]]3[BD]B9[3[F]]3[F]]]3[9[3[BD]]3[BD]B9[3[F]]3[F]]9[3[B]]3[B]A]9[9[FD]4[FD]]5[FD]9[6[9[6[...
result:
ok correct (length = 526)
Test #12:
score: 0
Accepted
time: 2ms
memory: 3412kb
input:
251
output:
2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A9[3[E]]2[E]9[3[AC]]2[AC]A]9[6[FD]]6[FD]9[3[9[3[BD]]3[BD]B9[3[F]]3[F]]]3[9[3[BD]]3[BD]B9[3[F]]3[F]]9[3[B]]3[B]A9[6[E]]7[E]9[6[AC]]7[AC]A]9...
result:
ok correct (length = 456)
Test #13:
score: 0
Accepted
time: 0ms
memory: 3372kb
input:
252
output:
2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A9[3[E]]2[E]9[3[AC]]2[AC]A]9[6[FD]]6[FD]9[3[9[3[BD]]3[BD]B9[3[F]]3[F]]]3[9[3[BD]]3[BD]B9[3[F]]3[F]]9[3[B]]3[B]A9[6[E]]7[E]9[6[AC]]7[AC]A]9...
result:
ok correct (length = 479)
Test #14:
score: 0
Accepted
time: 2ms
memory: 3372kb
input:
299
output:
2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[AC]A]9[FD]7[FD]8[8[BD]B8[F]]8[B]A]9[3[FD]]7[FD]9[9[BD]8[BD]B9[F]8[F]]8[9[BD]8[BD]B9[F]8[F]]9[B]8[B]A9[3[E]]8[E]9[3[AC]]8[AC]A]9[8[FD]]9[4[9[4[BD]]B9[4[F]]]]9[4[B]]A9[8[E]]E9[8[AC]]ACA]9[9[FD]7[FD]]4[FD]9[8[9[8[BD]]2[BD]B9[8[F]]2[F]]]2[9[8[BD]]...
result:
ok correct (length = 486)
Test #15:
score: 0
Accepted
time: 0ms
memory: 3428kb
input:
300
output:
2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[AC]A]9[FD]7[FD]8[8[BD]B8[F]]8[B]A]9[3[FD]]7[FD]9[9[BD]8[BD]B9[F]8[F]]8[9[BD]8[BD]B9[F]8[F]]9[B]8[B]A9[3[E]]8[E]9[3[AC]]8[AC]A]9[8[FD]]9[4[9[4[BD]]B9[4[F]]]]9[4[B]]A9[8[E]]E9[8[AC]]ACA]9[9[FD]7[FD]]4[FD]9[8[9[8[BD]]2[BD]B9[8[F]]2[F]]]2[9[8[BD]]...
result:
ok correct (length = 515)
Subtask #2:
score: 1
Accepted
Test #16:
score: 1
Accepted
time: 0ms
memory: 3368kb
input:
320
output:
2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A]9[2[FD]]9[9[BD]B9[F]]9[B]A]9[4[FD]]2[FD]9[2[9[2[BD]]BDB9[2[F]]F]]9[2[BD]]BDB9[2[F]]F9[2[B]]BA]9[8[FD]]6[FD]9[4[9[4[BD]]3[BD]B9[4[F]]3[F]]]3[9[4[BD]]3[BD]B9[4[F]]3[F]]9[4[B]]3[B]A]9[9[FD]8[FD]]5[FD]9[8[9[8[BD]]7[BD]B9[8[F]]7[F]]]7[9[8[BD]]...
result:
ok correct (length = 555)
Test #17:
score: 0
Accepted
time: 2ms
memory: 3408kb
input:
321
output:
2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A]9[2[FD]]9[9[BD]B9[F]]9[B]A]9[4[FD]]2[FD]9[2[9[2[BD]]BDB9[2[F]]F]]9[2[BD]]BDB9[2[F]]F9[2[B]]BA]9[8[FD]]6[FD]9[4[9[4[BD]]3[BD]B9[4[F]]3[F]]]3[9[4[BD]]3[BD]B9[4[F]]3[F]]9[4[B]]3[B]A]9[9[FD]8[FD]]5[FD]9[8[9[8[BD]]7[BD]B9[8[F]]7[F]]]7[9[8[BD]]...
result:
ok correct (length = 507)
Test #18:
score: 0
Accepted
time: 2ms
memory: 3432kb
input:
1000
output:
2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A9[3[E]]2[E]9[3[AC]]2[AC]A]9[6[FD]]6[FD]9[3[9[3[BD]]3[BD]B9[3[F]]3[F]]]3[9[3[BD]]3[BD]B9[3[F]]3[F]]9[3[B]]3[B]A]9[9[FD]4[FD]]5[FD]9[6[...
result:
ok correct (length = 809)
Test #19:
score: 0
Accepted
time: 2ms
memory: 3408kb
input:
1024
output:
2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9[9[3[FD]]FD]2[FD]9...
result:
ok correct (length = 663)
Test #20:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
1235
output:
2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[AC]A]9[FD]7[FD]8[8[BD]B8[F]]8[B]A9[E]8[E]9[AC]8[AC]A]9[4[FD]]9[2[9[2[BD]]B9[2[F]]]]9[2[B]]A]9[8[FD]]2[FD]9[4[9[4[BD]]BDB9[4[F]]F]]9[4[BD]]BDB9[4[F]]F9[4[B]]BA9[8[E]]3[E]9[8[AC]]3[AC]A]9[9[FD]7[FD]]8[FD]9[8[9[8[BD]]4[BD]B9[8[F]]4[F]]]4[9[8[...
result:
ok correct (length = 934)
Test #21:
score: 0
Accepted
time: 2ms
memory: 3392kb
input:
4094
output:
2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A9[3[E]]2[E]9[3[AC]]2[AC]A]9[6[FD]]6[FD]9[3[9[3[BD]]3[BD]B9[3[F]]3[F]]]3[9[3[BD]]3[BD]B9[3[F]]3[F]]9[3[B]]3[B]A9[6[E]]7[E]9[6[AC]]...
result:
ok correct (length = 1296)
Test #22:
score: 0
Accepted
time: 1ms
memory: 3392kb
input:
4095
output:
2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9[9[3[FD]]FD]2[...
result:
ok correct (length = 1027)
Test #23:
score: 0
Accepted
time: 2ms
memory: 3484kb
input:
4096
output:
2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9[9[3[FD]]FD]2[...
result:
ok correct (length = 1056)
Test #24:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
4097
output:
2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9[9[3[FD]]FD]2[...
result:
ok correct (length = 933)
Test #25:
score: 0
Accepted
time: 2ms
memory: 3452kb
input:
4998
output:
2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[AC]A]9[FD]7[FD]8[8[BD]B8[F]]8[B]A9[E]8[E]9[AC]8[AC]A]9[4[FD]]9[2[9[2[BD]]B9[2[F]]]]9[2[B]]A9[4[E]]E9[4[AC]]ACA]9[8[FD]]4[FD]9[4[9[4[BD]]2[BD]B9[4[F]]2[F]]]2[9[4[BD]]2[BD]B9[4[F]]2[F]]9[4[B]]2[B]A]9[9[FD]8[FD]]FD9[8[9[8[BD]]5[BD]B9[8[F]...
result:
ok correct (length = 1662)
Test #26:
score: 0
Accepted
time: 0ms
memory: 3384kb
input:
4999
output:
2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[AC]A]9[FD]7[FD]8[8[BD]B8[F]]8[B]A9[E]8[E]9[AC]8[AC]A]9[4[FD]]9[2[9[2[BD]]B9[2[F]]]]9[2[B]]A9[4[E]]E9[4[AC]]ACA]9[8[FD]]4[FD]9[4[9[4[BD]]2[BD]B9[4[F]]2[F]]]2[9[4[BD]]2[BD]B9[4[F]]2[F]]9[4[B]]2[B]A]9[9[FD]8[FD]]FD9[8[9[8[BD]]5[BD]B9[8[F]...
result:
ok correct (length = 1391)
Test #27:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
5000
output:
2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A7[E]7[AC]A]9[FD]7[FD]8[8[BD]B8[F]]8[B]A9[E]8[E]9[AC]8[AC]A]9[4[FD]]9[2[9[2[BD]]B9[2[F]]]]9[2[B]]A9[4[E]]E9[4[AC]]ACA]9[8[FD]]4[FD]9[4[9[4[BD]]2[BD]B9[4[F]]2[F]]]2[9[4[BD]]2[BD]B9[4[F]]2[F]]9[4[B]]2[B]A]9[9[FD]8[FD]]FD9[8[9[8[BD]]5[BD]B9[8[F]...
result:
ok correct (length = 1427)
Subtask #3:
score: 1
Accepted
Test #28:
score: 1
Accepted
time: 2ms
memory: 3492kb
input:
1000000
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A]9[6[FD]]4[FD]9[3[9[3[BD]]2[BD]B9[3[F]]2[F]]]2[9[3[BD]]2[BD]B9[3[F]]2[F]]9[3[B]]2[B]A9[6[E]]5[E]9[6[AC]]5[AC]A]9[...
result:
ok correct (length = 3639)
Test #29:
score: 0
Accepted
time: 2ms
memory: 3424kb
input:
999998
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A]9[6[FD]]4[FD]9[3[9[3[BD]]2[BD]B9[3[F]]2[F]]]2[9[3[BD]]2[BD]B9[3[F]]2[F]]9[3[B]]2[B]A9[6[E]]5[E]9[6[AC]]5[AC]A]9[...
result:
ok correct (length = 3998)
Test #30:
score: 0
Accepted
time: 2ms
memory: 3392kb
input:
524286
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A9[3[E]]2[E]9[3[AC]]2[AC]A]9[6[FD]]6[FD]9[3[9[3[BD]]3[BD]B9[3[F]]3[F]]]3[9[3[BD]]3[BD]B9[3[F]]3[F]]9[3[B]]3[B]A9[6[E...
result:
ok correct (length = 4435)
Test #31:
score: 0
Accepted
time: 2ms
memory: 3492kb
input:
524288
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9...
result:
ok correct (length = 3385)
Test #32:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
524290
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9...
result:
ok correct (length = 3262)
Test #33:
score: 0
Accepted
time: 2ms
memory: 3508kb
input:
786429
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A9[E]9[AC]A]9[2[FD]]2[FD]9[9[BD]BDB9[F]F]9[BD]BDB9[F]F9[B]BA9[2[E]]3[E]9[2[AC]]3[AC]A]9[4[FD]]8[FD]9[2[9[2[BD]]4[BD]B9[2[F]]4[F]]]4[9[2[BD]]4[BD]B9[2[F]]4[F]]9[2[B]]4[B]A9[5[E]]9[5[AC]]A]9[9[FD]FD]2[FD]9[5[9[5[BD]]BDB9...
result:
ok correct (length = 4370)
Test #34:
score: 0
Accepted
time: 2ms
memory: 3512kb
input:
786431
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A]9[FD]FD5[5[BD]B5[F]]5[B]A]9[2[FD]]4[FD]9[9[BD]2[BD]B9[F]2[F]]2[9[BD]2[BD]B9[F]2[F]]9[B]2[B]A]9[5[FD]]FD9[2[9[2[BD]]5[BD]B9[2[F]]5[F]]]5[9[2[BD]]5[BD]B9[2[F]]5[F]]9[2[B]]5[B]A]9[9[FD]FD]4[FD]9[5[9[5[BD]]2[BD]B9[5[F]]2[F]]]2[9[5[BD]]2[B...
result:
ok correct (length = 3562)
Test #35:
score: 0
Accepted
time: 2ms
memory: 3432kb
input:
951557
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A]9[2[FD]]8[FD]9[9[BD]4[BD]B9[F]4[F]]4[9[BD]4[BD]B9[F]4[F]]9[B]4[B]A9[3[E]]9[3[AC]]A]9[6[FD]]2[FD]9[3[9[3[BD]]BDB9[3[F]]F]]9[3[BD]]BDB9[3[F]]F9[3[B]]BA]9[9[FD]3[FD]]6[FD]9[6[9[6[BD]]3[BD]B9[6[F]]3[...
result:
ok correct (length = 4718)
Test #36:
score: 0
Accepted
time: 1ms
memory: 3392kb
input:
838702
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A]9[FD]FD5[5[BD]B5[F]]5[B]A]9[2[FD]]4[FD]9[9[BD]2[BD]B9[F]2[F]]2[9[BD]2[BD]B9[F]2[F]]9[B]2[B]A9[2[E]]5[E]9[2[AC]]5[AC]A]9[5[FD]]3[FD]9[2[9[2[BD]]6[BD]B9[2[F]]6[F]]]6[9[2[BD]]6[BD]B9[2[F]]6[F]]9[2[B]]6[B]A9[5[E]]4[E]9[5[AC]]4[AC]A]9[9[FD...
result:
ok correct (length = 4235)
Subtask #4:
score: 1
Accepted
Test #37:
score: 1
Accepted
time: 2ms
memory: 3420kb
input:
999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A]9[6[FD]]4[FD]9[3[9[3[BD]]2[BD]B9[3[F]]2[F]]]2[9[3[BD]]2[BD]B9[3[F]]2[F]]9[3[B]]2[B]A9[6[E]]5[E]9[6[AC]]5[AC]A]9[...
result:
ok correct (length = 3585)
Test #38:
score: 0
Accepted
time: 2ms
memory: 3404kb
input:
999997
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A5[E]5[AC]A]9[FD]3[FD]6[6[BD]B6[F]]6[B]A9[E]4[E]9[AC]4[AC]A]9[3[FD]]FD9[9[BD]5[BD]B9[F]5[F]]5[9[BD]5[BD]B9[F]5[F]]9[B]5[B]A]9[6[FD]]4[FD]9[3[9[3[BD]]2[BD]B9[3[F]]2[F]]]2[9[3[BD]]2[BD]B9[3[F]]2[F]]9[3[B]]2[B]A9[6[E]]5[E]9[6[AC]]5[AC]A]9[...
result:
ok correct (length = 3895)
Test #39:
score: 0
Accepted
time: 2ms
memory: 3432kb
input:
524287
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9...
result:
ok correct (length = 3337)
Test #40:
score: 0
Accepted
time: 0ms
memory: 3436kb
input:
524289
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A]9[9[FD]5[FD]]9[7[9[7[BD]]B9[7[F]]]]9[7[B]]A]9...
result:
ok correct (length = 3207)
Test #41:
score: 0
Accepted
time: 0ms
memory: 3412kb
input:
786428
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A9[E]9[AC]A]9[2[FD]]2[FD]9[9[BD]BDB9[F]F]9[BD]BDB9[F]F9[B]BA9[2[E]]3[E]9[2[AC]]3[AC]A]9[4[FD]]8[FD]9[2[9[2[BD]]4[BD]B9[2[F]]4[F]]]4[9[2[BD]]4[BD]B9[2[F]]4[F]]9[2[B]]4[B]A9[5[E]]9[5[AC]]A]9[9[FD]FD]2[FD]9[5[9[5[BD]]BDB9...
result:
ok correct (length = 4475)
Test #42:
score: 0
Accepted
time: 2ms
memory: 3508kb
input:
786430
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A9[E]9[AC]A]9[2[FD]]2[FD]9[9[BD]BDB9[F]F]9[BD]BDB9[F]F9[B]BA9[2[E]]3[E]9[2[AC]]3[AC]A]9[4[FD]]8[FD]9[2[9[2[BD]]4[BD]B9[2[F]]4[F]]]4[9[2[BD]]4[BD]B9[2[F]]4[F]]9[2[B]]4[B]A9[5[E]]9[5[AC]]A]9[9[FD]FD]2[FD]9[5[9[5[BD]]BDB9...
result:
ok correct (length = 4450)
Test #43:
score: 0
Accepted
time: 1ms
memory: 3504kb
input:
786432
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A]9[FD]FD5[5[BD]B5[F]]5[B]A]9[2[FD]]4[FD]9[9[BD]2[BD]B9[F]2[F]]2[9[BD]2[BD]B9[F]2[F]]9[B]2[B]A]9[5[FD]]FD9[2[9[2[BD]]5[BD]B9[2[F]]5[F]]]5[9[2[BD]]5[BD]B9[2[F]]5[F]]9[2[B]]5[B]A]9[9[FD]FD]4[FD]9[5[9[5[BD]]2[BD]B9[5[F]]2[F]]]2[9[5[BD]]2[B...
result:
ok correct (length = 3610)
Test #44:
score: 0
Accepted
time: 2ms
memory: 3528kb
input:
724171
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A9[E]9[AC]A]9[2[FD]]2[FD]9[9[BD]BDB9[F]F]9[BD]BDB9[F]F9[B]BA]9[4[FD]]6[FD]9[2[9[2[BD]]3[BD]B9[2[F]]3[F]]]3[9[2[BD]]3[BD]B9[2[F]]3[F]]9[2[B]]3[B]A]9[9[FD]]5[FD]9[4[9[4[BD]]7[BD]B9[4[F]]7[F]]]7[9[4[BD]]7[BD]B9[4[F]]7[F]]...
result:
ok correct (length = 3973)
Test #45:
score: 0
Accepted
time: 2ms
memory: 3432kb
input:
868406
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACA]4[FD]2[2[BD]B2[F]]2[B]A]9[FD]FD5[5[BD]B5[F]]5[B]A9[E]2[E]9[AC]2[AC]A]9[2[FD]]6[FD]9[9[BD]3[BD]B9[F]3[F]]3[9[BD]3[BD]B9[F]3[F]]9[B]3[B]A]9[5[FD]]5[FD]9[2[9[2[BD]]7[BD]B9[2[F]]7[F]]]7[9[2[BD]]7[BD]B9[2[F]]7[F]]9[2[B]]7[B]A9[5[E]]6[E]9[5[AC]]6[AC]A]9[9[FD]2[FD]...
result:
ok correct (length = 3980)
Subtask #5:
score: 0
Wrong Answer
Test #46:
score: 0
Wrong Answer
time: 0ms
memory: 3476kb
input:
10000000000
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A]9[2[FD]]9[9[BD]B9[F]]9[B]A9[2[E]]E9[2[AC]]ACA]9[4[FD]]4[FD]9[2[9[2[BD]]2[BD]B9[2[F]]2[F]]]2[9[2[BD]]2[BD]B9[2[F]]2[F]]9[2[B]]2[B]A]9[9[FD]]FD9[4[9[4[BD]]5[BD]B9[4[F]]5[F]]]5[9[4[BD]]5[BD]B9[4[F]...
result:
wrong answer incorrect path
Subtask #6:
score: 0
Wrong Answer
Test #55:
score: 0
Wrong Answer
time: 1ms
memory: 3492kb
input:
9999999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA3[E]3[AC]A]8[FD]4[4[BD]B4[F]]4[B]A]9[2[FD]]9[9[BD]B9[F]]9[B]A9[2[E]]E9[2[AC]]ACA]9[4[FD]]4[FD]9[2[9[2[BD]]2[BD]B9[2[F]]2[F]]]2[9[2[BD]]2[BD]B9[2[F]]2[F]]9[2[B]]2[B]A]9[9[FD]]FD9[4[9[4[BD]]5[BD]B9[4[F]]5[F]]]5[9[4[BD]]5[BD]B9[4[F]...
result:
wrong answer incorrect path
Subtask #7:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 2ms
memory: 3500kb
input:
100000000000000
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A9[7[E]]9[7[AC]]A]9[9[FD]5[FD...
result:
wrong answer incorrect path
Subtask #8:
score: 0
Wrong Answer
Test #84:
score: 0
Wrong Answer
time: 2ms
memory: 3456kb
input:
99999999999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]2[FD]BDBFBA]6[FD]3[3[BD]B3[F]]3[B]A]9[FD]5[FD]7[7[BD]B7[F]]7[B]A]9[3[FD]]3[FD]9[9[BD]6[BD]B9[F]6[F]]6[9[BD]6[BD]B9[F]6[F]]9[B]6[B]A]9[6[FD]]8[FD]9[3[9[3[BD]]4[BD]B9[3[F]]4[F]]]4[9[3[BD]]4[BD]B9[3[F]]4[F]]9[3[B]]4[B]A9[7[E]]9[7[AC]]A]9[9[FD]5[FD...
result:
wrong answer incorrect path
Subtask #9:
score: 0
Memory Limit Exceeded
Test #103:
score: 0
Memory Limit Exceeded
input:
1000000000000000000
output:
result:
Subtask #10:
score: 0
Memory Limit Exceeded
Test #128:
score: 0
Memory Limit Exceeded
input:
999999999999999999