QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#75122 | #5236. Wersja dla profesjonalistów [A] | XZTmaxsmall67 | 0 | 2ms | 3460kb | C++23 | 542b | 2023-02-04 15:36:41 | 2023-02-04 15:36:44 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
string add(string s,int v)
{
string t="";
for(;v;v>>=1,s="2["+s+"]")if(v&1)t=t+s;
return t;
}
void work(int n)
{
if(n==1)return void(cout<<"AE");
if(n==2)return void(cout<<"AEACAEE");
int a=n/2,b=(n-1)/2;work(a);work(b);
string s=add("AC",b)+"A";
string s1=add("CE",b)+"C"+add("A",b);
string s2=add("E",a+b+1);
cout<<s+add(s1,a)+s2;
}
signed main()
{
cin>>n;
if(n>1000)return 0;
work(n);
cout<<add("C",n);
return 0;
}
/*
*/
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 1
Accepted
time: 2ms
memory: 3324kb
input:
1
output:
AEC
result:
ok correct (length = 3)
Test #2:
score: 0
Accepted
time: 0ms
memory: 3404kb
input:
2
output:
AEACAEE2[C]
result:
ok correct (length = 13)
Test #3:
score: -1
Wrong Answer
time: 2ms
memory: 3460kb
input:
4
output:
AEACAEEAEACA2[CECA]2[2[E]]2[2[C]]
result:
wrong answer incorrect path
Subtask #2:
score: 0
Wrong Answer
Test #16:
score: 0
Wrong Answer
time: 1ms
memory: 3360kb
input:
320
output:
AEACAEEAEACAEE2[AC]A2[2[CE]C2[A]]E2[2[E]]AEACAEEAEACA2[CECA]2[2[E]]2[2[AC]]A2[2[CE]]C2[2[A]]2[2[2[2[CE]]C2[2[A]]]]2[E]2[2[2[E]]]AEACAEEAEACA2[CECA]2[2[E]]AEACAEEAEACA2[CECA]2[2[E]]2[2[AC]]A2[2[2[2[CE]]C2[2[A]]]]E2[2[2[E]]]AC2[2[2[AC]]]A2[CE2[2[2[CE]]]CA2[2[2[A]]]]2[2[2[CE2[2[2[CE]]]CA2[2[2[A]]]]]]2[...
result:
wrong answer incorrect path
Subtask #3:
score: 0
Wrong Answer
Test #28:
score: 0
Wrong Answer
time: 1ms
memory: 3400kb
input:
1000000
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #4:
score: 0
Wrong Answer
Test #37:
score: 0
Wrong Answer
time: 1ms
memory: 3396kb
input:
999999
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #5:
score: 0
Wrong Answer
Test #46:
score: 0
Wrong Answer
time: 1ms
memory: 3320kb
input:
10000000000
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #6:
score: 0
Wrong Answer
Test #55:
score: 0
Wrong Answer
time: 2ms
memory: 3328kb
input:
9999999999
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #7:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 1ms
memory: 3320kb
input:
100000000000000
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #8:
score: 0
Wrong Answer
Test #84:
score: 0
Wrong Answer
time: 0ms
memory: 3324kb
input:
99999999999999
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #9:
score: 0
Wrong Answer
Test #103:
score: 0
Wrong Answer
time: 2ms
memory: 3316kb
input:
1000000000000000000
output:
result:
wrong output format Unexpected end of file - token expected
Subtask #10:
score: 0
Wrong Answer
Test #128:
score: 0
Wrong Answer
time: 1ms
memory: 3340kb
input:
999999999999999999
output:
result:
wrong output format Unexpected end of file - token expected