QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#75162#5236. Wersja dla profesjonalistów [A]XZTmaxsmall670 2ms3472kbC++23592b2023-02-04 16:01:102023-02-04 16:01:24

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 16:01:24]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3472kb
  • [2023-02-04 16:01:10]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
string add(string a,int v)
{
	if(!v)return "";
	if(v<10)return to_string(v)+"["+a+"]";
	return "9["+add(a,v/9)+"]"+string(a,v%9);
}
string work(int n)
{
	if(n==1)return "AE";
	if(n==2)return "AEACAEE";
	if(n%2==0)return add("A",n)+add("EC",n-1)+"E"+work(n-1);
	int a=(n-1)/2;
	string s=add("AC",a)+"A";
	string s1=add("CE",a)+"C"+add("A",a+1);
	string s2=add("E",n);
	return "2["+work(a)+"]"+s+add(s1,a)+s2;
}
signed main()
{
	cin>>n;
	cout<<work(n);
	cout<<add("C",n);
	return 0;
}
/*
*/ 

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

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

input:

1

output:

AE1[C]

result:

ok correct (length = 3)

Test #2:

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

input:

2

output:

AEACAEE2[C]

result:

ok correct (length = 13)

Test #3:

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

input:

4

output:

4[A]3[EC]E2[AE]1[AC]A1[1[CE]C2[A]]3[E]4[C]

result:

ok correct (length = 30)

Test #4:

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

input:

5

output:

2[AEACAEE]2[AC]A2[2[CE]C3[A]]5[E]5[C]

result:

ok correct (length = 43)

Test #5:

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

input:

6

output:

6[A]5[EC]E2[AEACAEE]2[AC]A2[2[CE]C3[A]]5[E]6[C]

result:

ok correct (length = 53)

Test #6:

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

input:

7

output:

2[2[AE]1[AC]A1[1[CE]C2[A]]3[E]]3[AC]A3[3[CE]C4[A]]7[E]7[C]

result:

ok correct (length = 53)

Test #7:

score: -1
Wrong Answer
time: 2ms
memory: 3364kb

input:

10

output:

9[1[A]]9[EC]E2[4[A]3[EC]E2[AE]1[AC]A1[1[CE]C2[A]]3[E]]4[AC]A4[4[CE]C5[A]]9[E]9[1[C]]

result:

wrong answer incorrect path

Subtask #2:

score: 0
Dangerous Syscalls

Test #16:

score: 0
Dangerous Syscalls

input:

320

output:


result:


Subtask #3:

score: 0
Dangerous Syscalls

Test #28:

score: 0
Dangerous Syscalls

input:

1000000

output:


result:


Subtask #4:

score: 0
Dangerous Syscalls

Test #37:

score: 0
Dangerous Syscalls

input:

999999

output:


result:


Subtask #5:

score: 0
Dangerous Syscalls

Test #46:

score: 0
Dangerous Syscalls

input:

10000000000

output:


result:


Subtask #6:

score: 0
Dangerous Syscalls

Test #55:

score: 0
Dangerous Syscalls

input:

9999999999

output:


result:


Subtask #7:

score: 0
Dangerous Syscalls

Test #64:

score: 0
Dangerous Syscalls

input:

100000000000000

output:


result:


Subtask #8:

score: 0
Dangerous Syscalls

Test #84:

score: 0
Dangerous Syscalls

input:

99999999999999

output:


result:


Subtask #9:

score: 0
Dangerous Syscalls

Test #103:

score: 0
Dangerous Syscalls

input:

1000000000000000000

output:


result:


Subtask #10:

score: 0
Dangerous Syscalls

Test #128:

score: 0
Dangerous Syscalls

input:

999999999999999999

output:


result: