QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#75105#5236. Wersja dla profesjonalistów [A]XZTmaxsmall670 348ms3540kbC++23575b2023-02-04 15:28:542023-02-04 15:28:56

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:28:56]
  • 评测
  • 测评结果:0
  • 用时:348ms
  • 内存:3540kb
  • [2023-02-04 15:28:54]
  • 提交

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<<"AC");
	if(n==2)return void(cout<<"ACAEACC");
	int a=n/2,b=(n-1)/2;work(a);work(b);
	string s=add("AE",b)+"A";
	string s1=add("EC",b)+"E"+add("A",b);
	string s2=add("B",a+b+1);
	cout<<s+add(s1,a)+s2;;
}
signed main()
{
	cin>>n;
	work(n);
	cout<<add("E",n);
	return 0;
}
/*
A 右
B 右上
C 左上
D 左
E 左下
F 右下
*/ 

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: 3480kb

input:

1

output:

ACE

result:

wrong answer incorrect path

Subtask #2:

score: 0
Wrong Answer

Test #16:

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

input:

320

output:

ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEAECEABAEAECEA2[ECEA]B2[B]ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]AE2[AE]2[...

result:

wrong answer incorrect path

Subtask #3:

score: 0
Wrong Answer

Test #28:

score: 0
Wrong Answer
time: 343ms
memory: 3348kb

input:

1000000

output:

ACACAEAECEAB2[B]ACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACACAEAECEAB2[B]ACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]AE2[AE]2[2[AE]]AEC2[EC]2[2[EC]]EA2[A]2[2[A]]2[EC2[EC]2[2[EC]]EA2[A]2[2[A]]]2[2[EC2[EC]2[2[EC]]EA2[A]2[2[A]]]]B2[B]2[2[B]]2[2[2[B]]]ACACAEA...

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: 348ms
memory: 3540kb

input:

999999

output:

ACACAEAECEAB2[B]ACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACACAEAECEAB2[B]ACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]AE2[AE]2[2[AE]]AEC2[EC]2[2[EC]]EA2[A]2[2[A]]2[EC2[EC]2[2[EC]]EA2[A]2[2[A]]]2[2[EC2[EC]2[2[EC]]EA2[A]2[2[A]]]]B2[B]2[2[B]]2[2[2[B]]]ACACAEA...

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:

ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]ACAEACCACAEAECEABACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]BAEAECEA2[ECEA]B2[B]ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]ACAEACCACAEAECEABACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]BAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACAEACCACAE...

result:


Subtask #6:

score: 0
Time Limit Exceeded

Test #55:

score: 0
Time Limit Exceeded

input:

9999999999

output:

ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]ACAEACCACAEAECEABACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]BAEAECEA2[ECEA]B2[B]ACAEACCACAEAECEABACAEACCACAEAECEABAEAECEAB2[B]ACAEACCACAEAECEABACACAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]BAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACAEACCACAE...

result:


Subtask #7:

score: 0
Time Limit Exceeded

Test #64:

score: 0
Time Limit Exceeded

input:

100000000000000

output:

ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEACCAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEAECEABAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]2[2[EC2[EC]EA2[A]]]B2[B]2[2[B]]ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEACCAEAECEAB2[B]AE2[AE]AEC2[EC]EA...

result:


Subtask #8:

score: 0
Time Limit Exceeded

Test #84:

score: 0
Time Limit Exceeded

input:

99999999999999

output:

ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEACCAEAECEAB2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEAECEABAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]2[2[EC2[EC]EA2[A]]]B2[B]2[2[B]]ACAEACCACAEACCAEAECEAB2[B]ACAEACCACAEACCAEAECEAB2[B]AE2[AE]AEC2[EC]EA...

result:


Subtask #9:

score: 0
Time Limit Exceeded

Test #103:

score: 0
Time Limit Exceeded

input:

1000000000000000000

output:

ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]AE2[AE]2[2[AE]]AEC2[EC]2[2[EC]]EA2...

result:


Subtask #10:

score: 0
Time Limit Exceeded

Test #128:

score: 0
Time Limit Exceeded

input:

999999999999999999

output:

ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]ACACAEAECEAB2[B]ACAEACCAEAECEA2[ECEA]B2[B]AE2[AE]AEC2[EC]EA2[A]2[EC2[EC]EA2[A]]B2[B]2[2[B]]AE2[AE]2[2[AE]]AEC2[EC]2[2[EC]]EA2...

result: