QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#75114#5236. Wersja dla profesjonalistów [A]XZTmaxsmall670 302ms3476kbC++23520b2023-02-04 15:32:552023-02-04 15:32:58

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-02-04 15:32:58]
  • 评测
  • 测评结果:0
  • 用时:302ms
  • 内存:3476kb
  • [2023-02-04 15:32:55]
  • 提交

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)if(v&1)t=t+s,s="2["+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;
	work(n);
	cout<<add("E",n);
	return 0;
}
/*
*/ 

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1

output:

AEE

result:

wrong answer incorrect path

Subtask #2:

score: 0
Wrong Answer

Test #16:

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

input:

320

output:

AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACACECAEACACECA2[CECA]E2[E]AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AC2[AC]2[...

result:

wrong answer incorrect path

Subtask #3:

score: 0
Wrong Answer

Test #28:

score: 0
Wrong Answer
time: 302ms
memory: 3476kb

input:

1000000

output:

AEAEACACECAE2[E]AEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEAEACACECAE2[E]AEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AC2[AC]2[2[AC]]ACE2[CE]2[2[CE]]CA2[A]2[2[A]]2[CE2[CE]2[2[CE]]CA2[A]2[2[A]]]2[2[CE2[CE]2[2[CE]]CA2[A]2[2[A]]]]E2[E]2[2[E]]2[2[2[E]]]AEAEACA...

result:

wrong answer the length of your output (31430748) exceeds the constraint (150000)

Subtask #4:

score: 0
Wrong Answer

Test #37:

score: 0
Wrong Answer
time: 283ms
memory: 3440kb

input:

999999

output:

AEAEACACECAE2[E]AEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEAEACACECAE2[E]AEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AC2[AC]2[2[AC]]ACE2[CE]2[2[CE]]CA2[A]2[2[A]]2[CE2[CE]2[2[CE]]CA2[A]2[2[A]]]2[2[CE2[CE]2[2[CE]]CA2[A]2[2[A]]]]E2[E]2[2[E]]2[2[2[E]]]AEAEACA...

result:

wrong answer the length of your output (31435571) exceeds the constraint (150000)

Subtask #5:

score: 0
Time Limit Exceeded

Test #46:

score: 0
Time Limit Exceeded

input:

10000000000

output:

AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AEACAEEAEACACECAEAEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]EACACECA2[CECA]E2[E]AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AEACAEEAEACACECAEAEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]EACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEACAEEAEAC...

result:


Subtask #6:

score: 0
Time Limit Exceeded

Test #55:

score: 0
Time Limit Exceeded

input:

9999999999

output:

AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AEACAEEAEACACECAEAEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]EACACECA2[CECA]E2[E]AEACAEEAEACACECAEAEACAEEAEACACECAEACACECAE2[E]AEACAEEAEACACECAEAEAEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]EACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEACAEEAEAC...

result:


Subtask #7:

score: 0
Time Limit Exceeded

Test #64:

score: 0
Time Limit Exceeded

input:

100000000000000

output:

AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACAEEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACACECAEACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]2[2[CE2[CE]CA2[A]]]E2[E]2[2[E]]AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACAEEACACECAE2[E]AC2[AC]ACE2[CE]CA...

result:


Subtask #8:

score: 0
Time Limit Exceeded

Test #84:

score: 0
Time Limit Exceeded

input:

99999999999999

output:

AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACAEEACACECAE2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACACECAEACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]2[2[CE2[CE]CA2[A]]]E2[E]2[2[E]]AEACAEEAEACAEEACACECAE2[E]AEACAEEAEACAEEACACECAE2[E]AC2[AC]ACE2[CE]CA...

result:


Subtask #9:

score: 0
Time Limit Exceeded

Test #103:

score: 0
Time Limit Exceeded

input:

1000000000000000000

output:

AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AC2[AC]2[2[AC]]ACE2[CE]2[2[CE]]CA2...

result:


Subtask #10:

score: 0
Time Limit Exceeded

Test #128:

score: 0
Time Limit Exceeded

input:

999999999999999999

output:

AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AEAEACACECAE2[E]AEACAEEACACECA2[CECA]E2[E]AC2[AC]ACE2[CE]CA2[A]2[CE2[CE]CA2[A]]E2[E]2[2[E]]AC2[AC]2[2[AC]]ACE2[CE]2[2[CE]]CA2...

result: