QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#75088#5236. Wersja dla profesjonalistów [A]stkwill0 2ms3772kbC++14651b2023-02-04 15:11:252023-02-04 15:11:27

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:11:27]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3772kb
  • [2023-02-04 15:11:25]
  • 提交

answer

#include <bits/stdc++.h>

using int64 = long long;

const int N = 200005;

inline void Solve(int64 n) {
    if (n == 1) return void(printf("AE"));
    if (n == 2) return void(printf("AAECEAE"));
    if (!(n & 1)) return printf("%lld[A]%lld[EC]E", n, n - 1), Solve(n - 1);
    int k = n / 2;
    printf("2["), Solve(k), printf("]");
    printf("%lld[AC]A", k);
    printf("%lld[%lld[CE]C%lld[A]]", k, k, k + 1);
    printf("%lld[E]", n);
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr), std::cout.tie(nullptr);
    int64 n;
    std::cin >> n;
    Solve(n), printf("%lld[C]\n", n);
    return 0;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 1
Accepted
time: 2ms
memory: 3716kb

input:

1

output:

AE1[C]

result:

ok correct (length = 3)

Test #2:

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

input:

2

output:

AAECEAE2[C]

result:

ok correct (length = 13)

Test #3:

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

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

input:

5

output:

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

result:

ok correct (length = 43)

Test #5:

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

input:

6

output:

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

result:

ok correct (length = 53)

Test #6:

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

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

input:

10

output:

10[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]10[C]

result:

wrong answer invalid output

Subtask #2:

score: 0
Wrong Answer

Test #16:

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

input:

320

output:

320[A]319[EC]E2[2[2[2[2[2[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[AC]A9[9[CE]C10[A]]19[E]]19[AC]A19[19[CE]C20[A]]39[E]]39[AC]A39[39[CE]C40[A]]79[E]]79[AC]A79[79[CE]C80[A]]159[E]]159[AC]A159[159[CE]C160[A]]319[E]320[C]

result:

wrong answer invalid output

Subtask #3:

score: 0
Wrong Answer

Test #28:

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

input:

1000000

output:

1000000[A]999999[EC]E2[2[2[2[2[2[15624[A]15623[EC]E2[2[2[1952[A]1951[EC]E2[2[2[2[2[60[A]59[EC]E2[2[14[A]13[EC]E2[6[A]5[EC]E2[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]13[E]]14[AC]A14[14[CE]C15[A]]29[E]]29[AC]A29[29[CE]C30[A]]59[E]]60[AC]A60[60[CE]C61[A]]121[E]]121[AC]A121[121[CE]C122[A]]243...

result:

wrong answer invalid output

Subtask #4:

score: 0
Wrong Answer

Test #37:

score: 0
Wrong Answer
time: 0ms
memory: 3720kb

input:

999999

output:

2[2[2[2[2[2[15624[A]15623[EC]E2[2[2[1952[A]1951[EC]E2[2[2[2[2[60[A]59[EC]E2[2[14[A]13[EC]E2[6[A]5[EC]E2[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]13[E]]14[AC]A14[14[CE]C15[A]]29[E]]29[AC]A29[29[CE]C30[A]]59[E]]60[AC]A60[60[CE]C61[A]]121[E]]121[AC]A121[121[CE]C122[A]]243[E]]243[AC]A243[243[C...

result:

wrong answer invalid output

Subtask #5:

score: 0
Wrong Answer

Test #46:

score: 0
Wrong Answer
time: 0ms
memory: 3560kb

input:

10000000000

output:

10000000000[A]9999999999[EC]E2[2[2[2[2[2[2[2[2[2[1377016[A]1377015[EC]E2[2[2[172126[A]172125[EC]E2[86062[A]86061[EC]E2[43030[A]43029[EC]E2[21514[A]21513[EC]E2[10756[A]10755[EC]E2[2[2688[A]2687[EC]E2[2[2[2[2[2[2[20[A]19[EC]E2[2[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[AC]A9[9[...

result:

wrong answer invalid output

Subtask #6:

score: 0
Wrong Answer

Test #55:

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

input:

9999999999

output:

2[2[2[2[2[2[2[2[2[2[1377016[A]1377015[EC]E2[2[2[172126[A]172125[EC]E2[86062[A]86061[EC]E2[43030[A]43029[EC]E2[21514[A]21513[EC]E2[10756[A]10755[EC]E2[2[2688[A]2687[EC]E2[2[2[2[2[2[2[20[A]19[EC]E2[2[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[AC]A9[9[CE]C10[A]]19[E]]20[AC]A20[20[...

result:

wrong answer invalid output

Subtask #7:

score: 0
Time Limit Exceeded

Test #64:

score: 0
Time Limit Exceeded

input:

100000000000000

output:

100000000000000[A]99999999999999[EC]E2[2[-1004630016[A]-1004630017[EC]E2[-502315008[A]-502315009[EC]E2[-251157504[A]-251157505[EC]E2[-125578752[A]-125578753[EC]E2[-62789376[A]-62789377[EC]E2[-31394688[A]-31394689[EC]E2[-15697344[A]-15697345[EC]E2[-7848672[A]-7848673[EC]E2[-3924336[A]-3924337[EC]E2[-...

result:


Subtask #8:

score: 0
Time Limit Exceeded

Test #84:

score: 0
Time Limit Exceeded

input:

99999999999999

output:

2[2[-1004630016[A]-1004630017[EC]E2[-502315008[A]-502315009[EC]E2[-251157504[A]-251157505[EC]E2[-125578752[A]-125578753[EC]E2[-62789376[A]-62789377[EC]E2[-31394688[A]-31394689[EC]E2[-15697344[A]-15697345[EC]E2[-7848672[A]-7848673[EC]E2[-3924336[A]-3924337[EC]E2[-1962168[A]-1962169[EC]E2[-981084[A]-9...

result:


Subtask #9:

score: 0
Time Limit Exceeded

Test #103:

score: 0
Time Limit Exceeded

input:

1000000000000000000

output:

1000000000000000000[A]999999999999999999[EC]E2[2[-371654656[A]-371654657[EC]E2[-185827328[A]-185827329[EC]E2[-92913664[A]-92913665[EC]E2[-46456832[A]-46456833[EC]E2[-23228416[A]-23228417[EC]E2[-11614208[A]-11614209[EC]E2[-5807104[A]-5807105[EC]E2[-2903552[A]-2903553[EC]E2[-1451776[A]-1451777[EC]E2[-...

result:


Subtask #10:

score: 0
Time Limit Exceeded

Test #128:

score: 0
Time Limit Exceeded

input:

999999999999999999

output:

2[2[-371654656[A]-371654657[EC]E2[-185827328[A]-185827329[EC]E2[-92913664[A]-92913665[EC]E2[-46456832[A]-46456833[EC]E2[-23228416[A]-23228417[EC]E2[-11614208[A]-11614209[EC]E2[-5807104[A]-5807105[EC]E2[-2903552[A]-2903553[EC]E2[-1451776[A]-1451777[EC]E2[-725888[A]-725889[EC]E2[-362944[A]-362945[EC]E...

result: